Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <uuji0p$3ts8k$1@dont-email.me>
Deutsch   English   Français   Italiano  
<uuji0p$3ts8k$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.nobody.at!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Chris Ahlstrom <OFeem1987@teleworm.us>
Newsgroups: comp.os.linux.advocacy
Subject: Re: Why Python When There Is Perl?
Date: Wed, 3 Apr 2024 08:28:07 -0400
Organization: None
Lines: 57
Message-ID: <uuji0p$3ts8k$1@dont-email.me>
References: <17be420c4f90bfc7$63225$1585792$802601b3@news.usenetexpress.com>
 <utd86u$1ipcj$1@solani.org> <utfo33$1o6mu$3@dont-email.me>
 <l61vaiFn16lU2@mid.individual.net> <utgikt$21nsq$1@dont-email.me>
 <l646ogF2m1hU4@mid.individual.net> <utjv9u$2u8be$1@dont-email.me>
 <utleqa$3993q$2@dont-email.me> <utmic2$3k6u5$10@dont-email.me>
 <utnmea$3tet3$4@dont-email.me> <utpaea$cntv$3@dont-email.me>
 <uuge9n$32hhs$16@dont-email.me> <uugv1d$36oe5$5@dont-email.me>
 <uuj1kh$3phh2$7@dont-email.me>
Reply-To: OFeem1987@teleworm.us
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 03 Apr 2024 12:28:10 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="4f192940848a230e4019e60c0cbac98b";
	logging-data="4124948"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18acgGjUOTbF2ispiT+eaxM"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:uR4o0dFphTo0LuSYjgmOhysGGG0=
X-User-Agent: Microsoft Outl00k, Usenet K00k Editions
X-Slrn: Why use anything else?
X-Mutt: The most widely-used MUA
Bytes: 3775

Lawrence D'Oliveiro wrote this copyrighted missive and expects royalties:

> On Tue, 2 Apr 2024 08:51:57 -0400, Chris Ahlstrom wrote:
>
>> Lawrence D'Oliveiro wrote this copyrighted missive and expects
>> royalties:
>> 
>>> On Sun, 24 Mar 2024 09:39:21 -0400, Chris Ahlstrom wrote:
>>>
>>>> C++ can do template metaprogramming.
>>>
>>> Python doesn’t need two different languages for “compile-time” versus
>>> “run-time” programming; it uses the same language for both.
>> 
>> I think that Alexander Stepanov would say..... [some incomprehensible
>> C++ technical term]
>
> Also, consider enums. I think C++ only has the old, boring, C-style enums. 

Nah, it also has "enum class" etc.

    https://en.cppreference.com/w/cpp/language/enum

> Java managed to introduce quite an advanced enum facility, with the 
> ability to attach custom methods and attributes to enum instances.

The C++ enum-class is scoped and strongly typed, thus a bit restrictive.
Implicit conversion (e.g. to int or char) is not supported. In some cases, it
is useful to write free functions or operators to do things with them.  It gets
tiresome peppering code with static_cast<>.

> Python offers the same sort of thing as Java. Only, whereas Java enums are 
> a feature that is built into the core language, Python does it as a 
> standard library module, written in pure Python.
>
> How do we do it? Metaclasses! (Also descriptors help.)
>
>>> Function definitions and class definitions are not declarations: they
>>> are just forms of assignment statement.
>>>
>>> And then there are metaclasses ...
>> 
>> I wonder if the C++ metaclass proposal ever made it into C++. Will have
>> to check....
>
> I’ll be waiting.

Sounds like not. Apparently not considered worth the effort in the end.
After all, we already have abstract base classes and templates.

-- 
In the plot, people came to the land; the land loved them; they worked and
struggled and had lots of children.  There was a Frenchman who talked funny
and a greenhorn from England who was a fancy-pants but when it came to the
crunch he was all courage.  Those novels would make you retch.
		-- Canadian novelist Robertson Davies, on the generic Canadian
		   novel.