Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Chris Ahlstrom Newsgroups: comp.os.linux.misc,alt.folklore.computers Subject: Re: C structure portability, naughty Python Date: Sun, 4 Jan 2026 06:42:21 -0500 Organization: None Lines: 44 Message-ID: <10jdjmt$1ugk4$3@dont-email.me> References: <10j9a1l$1toj$1@gal.iecc.com> <10j9vvr$23cp$2@gal.iecc.com> <10jb0is$172cb$2@dont-email.me> Reply-To: OFeem1987@teleworm.us Injection-Date: Sun, 04 Jan 2026 11:42:22 +0000 (UTC) Injection-Info: dont-email.me; posting-host="b0e9d0b33e51ab25e6e6635aa46b65ae"; logging-data="2048644"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19DoVOWyTWrturKV8NpEB8E" User-Agent: slrn/1.0.3 (Linux) Cancel-Lock: sha1:gz/dvAoAV+ssf4F0kR9VQiwVuO4= X-Slrn: Why use anything else? X-Face: 63n<76,LYJQ2m#'5YL#.T95xqyPiG`ffIP70tN+j"(&@6(4l\7uL)2+/-r0)/9SjZ`qw= Njn mr93Xrerx}aQG-Ap5IHn"xe;`5:pp"$RH>Kx_ngWw%c\+6qSg!q"41n2[.N/;Pu6q8?+Poz~e A9? $6_R7cm.l!s8]yfv7x+-FYQ|/k X-Mutt: The most widely-used MUA X-User-Agent: Microsoft Outl00k, Usenet K00k Editions Xref: csiph.com comp.os.linux.misc:80461 alt.folklore.computers:233137 rbowman wrote this post by blinking in Morse code: > On Sat, 3 Jan 2026 07:03:38 -0500, Chris Ahlstrom wrote: > >> I once created an audio playback app with class hierarchies in C, rather >> than C++. It was an interesting experiment, and it worked. But that's >> the last time I tried that. > > A class is a glorified struct. I remember heated discussions at one of the > Boston Computer Society's meeting before 'C++' became a name about 'C with > Classes' and whether a new language was needed. C++ is wayyyyy beyond C w/classes now. Example: templates, promises, futures, and a greatly expanded Standard Library (e.g. the functions).. > 'C with Classes' is now a derogatory term that describes the sort of C++ I > write. Charles Petzhold has written a number of books on programming for > Windows. He has an intense dislike for C++ so if you can track down some > of the first editions of 'Programming Windows' they are all C. The 6th > edition was C# which he said was what should have been all along. Does Petzhold still have the Windows tattoo? :-D I was on a project where I had to use C#. Not bad, but I got a good laugh at things like the "using" kludge to mimic the exception-safety of C++ and that classes are always passed by reference even though the function call looks like passing a value. > The C approach was educational since it exposed some of the magic lke > vtables, and the magical 'this' is only another parameter passed in the > first location. Python's "self". -- Violence stinks, no matter which end of it you're on. But now and then there's nothing left to do but hit the other person over the head with a frying pan. Sometimes people are just begging for that frypan, and if we weaken for a moment and honor their request, we should regard it as impulsive philanthropy, which we aren't in any position to afford, but shouldn't regret it too loudly lest we spoil the purity of the deed. -- Tom Robbins