Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Chris Ahlstrom Newsgroups: comp.os.linux.advocacy Subject: Re: Why Python When There Is Perl? Date: Thu, 11 Apr 2024 11:38:44 -0400 Organization: None Lines: 38 Message-ID: References: <17be420c4f90bfc7$63225$1585792$802601b3@news.usenetexpress.com> Reply-To: OFeem1987@teleworm.us MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 11 Apr 2024 17:38:45 +0200 (CEST) Injection-Info: dont-email.me; posting-host="b52c6dca02f1377040fe3b4f129a3c27"; logging-data="1853386"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/S+B+eaIhm+bJ1TqHreX3g" User-Agent: slrn/1.0.3 (Linux) Cancel-Lock: sha1:d1rOJTeEz1l8XhfYLr3Bjou+iEw= X-User-Agent: Microsoft Outl00k, Usenet K00k Editions X-Slrn: Why use anything else? X-Mutt: The most widely-used MUA Bytes: 3270 Lawrence D'Oliveiro wrote this copyrighted missive and expects royalties: > On Wed, 10 Apr 2024 08:36:35 -0400, Chris Ahlstrom wrote: > >> Lawrence D'Oliveiro wrote this copyrighted missive and expects >> royalties: >> >>> I came up with an interesting use for [metaclasses], to allow >>> convenient definition of a hierarchy of exception classes representing >>> return codes from a given API. More details in the “Uses For >>> Metaclasses” notebook in this collection >>> . >> >> Interesting. It is not clear to me why you need metaclasses to implement >> the example, though. > > How would you do it at least as easily, without them? > > And how would you do that in C++? > >> On another note, C++20 introduces the concept of "concepts", which put >> constraints on templates and their parameters. > > In Python, that would just be another instance of the same type-annotation > system it already has. Remember that Python does not need a “template > language” versus a “run-time language”. > >> These programming languages arms races are fun! > > C++ is already over 5× the complexity of Python, and looks like it is > growing even faster. > > In other words, it is C++ that is struggling to keep up, not Python. Whatever, dude. Keep checking boxes in the feechure matrix. -- And do you think (fop that I am) that I could be the Scarlet Pumpernickel?