Deutsch English Français Italiano |
<uv614l$v3vk$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!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, 10 Apr 2024 08:36:35 -0400 Organization: None Lines: 53 Message-ID: <uv614l$v3vk$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> <uuji0p$3ts8k$1@dont-email.me> <uunik2$vbtu$6@dont-email.me> <uuorfr$1cbiv$5@dont-email.me> <uuq0qr$1lcgf$3@dont-email.me> <uurdea$22hkk$1@dont-email.me> <uv21vt$3q9do$3@dont-email.me> <uv3dab$7ecf$4@dont-email.me> <uv5dgn$q7om$2@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, 10 Apr 2024 12:36:37 +0200 (CEST) Injection-Info: dont-email.me; posting-host="d2663e4c33610f2a8f7d03b40b940866"; logging-data="1019892"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/+8kbo5iQZftnIj/iHoxkE" User-Agent: slrn/1.0.3 (Linux) Cancel-Lock: sha1:WlUS/xw7ELZBZDC2+FaplwBaz3U= X-Mutt: The most widely-used MUA X-Slrn: Why use anything else? X-User-Agent: Microsoft Outl00k, Usenet K00k Editions Bytes: 3590 Lawrence D'Oliveiro wrote this copyrighted missive and expects royalties: > On Tue, 9 Apr 2024 08:46:03 -0400, Chris Ahlstrom wrote: > >> Lawrence D'Oliveiro wrote this copyrighted missive and expects >> royalties: >> >>> On Sat, 6 Apr 2024 07:59:04 -0400, Chris Ahlstrom wrote: >>> >>>> Lawrence D'Oliveiro wrote this copyrighted missive and expects >>>> royalties: >>>> >>>>> Until you realized it would never work, because classes are not >>>>> objects in C++. >>>> >>>> :-D WTF you talkin', Willis? Ye nae true Scotman fallacy? >>> >>> You tell me: does C++ accept “true Scotsmen” among its users/features, >>> or not? >> >> C++ provides many forms of programming, including object-oriented >> programming. > > But no metaclasses, like Python does. > > I came up with an interesting use for them, 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 <https://gitlab.com/ldo/python_topics_notebooks/>. Interesting. It is not clear to me why you need metaclasses to implement the example, though. On another note, C++20 introduces the concept of "concepts", which put constraints on templates and their parameters. The constraints are based on concepts like you'd find at cppreference.com: std::map meets the requirements of Container, AllocatorAwareContainer, AssociativeContainer and ReversibleContainer. The full list is here: https://en.cppreference.com/w/cpp/concepts Well, not the full list: Additional concepts can be found in the iterators library, the algorithms library, and the ranges library. These programming languages arms races are fun! -- Time to be aggressive. Go after a tattooed Virgo.