🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #1942

Re: C and its peasant 'ancestors'

#1942
From: David Brown
Date: Sat, 28 Nov 2026 19:34
47 lines
3868 bytes
On 28/11/2026 19:47, Scott Lurndal wrote:
> Lawrence =?iso-8859-13?q?D=FFOliveiro?= <ldo@nz.invalid> writes:
>> On Thu, 26 Nov 2026 12:48:26 +0100, Bonita Montero wrote:
>>
>>> Am 26.11.2026 um 12:36 schrieb fir:
>>>
>>>> 1. the bloat of terrible c++ syntax (oop and those generix and
>>>> those all other non sane additions)
>>>
>>> It’s only "bloat" if you aren’t up to the task of handling it. I
>>> actually find C to be much more bloated, because the things you end
>>> up having to do alongside C++ often require a significant amount of
>>> real work.
>>
>> Would you like to take the Linus Torvalds challenge? He famously hates
>> C++, and won’t allow it into the Linux kernel.
> 
> I've worked on a full scale, massively parallel operating
> system and a distributed virtual machine manager, both written
> in C++ very successfully.
> 
> Of course, one must carefully choose _which_ C++ features
> are used (limited use of templates, no exceptions, no RTTI
> very limited STL (which didn't exist when the OS project
> started in 1989) for optimal performance.
> 
> C with classes isn't a bad description - one receives all the
> benefits of data hiding and inheritance provided by the class paradigm without
> the overhead required for stack unwinding and dynamic_cast<>.

There's a /lot/ more than just "C with classes" that is appropriate for 
low-level, bare metal and/or embedded programming in C++.  It is 
typically more a matter of what you want to avoid - dynamic memory, 
virtual functions (usually), exceptions, and anything else that has 
unexpected or unpredictable runtime costs.  I use a large number of C++ 
features in my small-systems embedded programming, but you do have to 
know what to avoid.  (I also avoid malloc/free and a number of other 
features and functions of C in embedded programming, but it is more 
obvious which should be avoided.)

To be fair, the C++ language and toolchains are far better suited to 
embedded programming than they were in 1989 !

(And they are getting better - there is progress being made specifically 
towards more features suitable for freestanding systems, such as 
inplace_vector.)
Technical Details
Message-ID: <11efabi$2rvk1$2@dont-email.me>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11dup6q$v4j9$1@dont-email.me> <11e8stp$hajr$1@dont-email.me> <11e8ti0$hhqa$1@dont-email.me> <11e8v24$i2mc$2@raubtier-asyl.eternal-september.org> <11e9045$ihk3$1@dont-email.me> <11e90a8$ikh0$1@dont-email.me> <11e90mv$io87$2@raubtier-asyl.eternal-september.org> <11e91ns$j5dv$1@dont-email.me> <11e92ff$jclo$1@raubtier-asyl.eternal-september.org> <11e95j2$kimu$1@dont-email.me> <11e96aa$kpta$1@raubtier-asyl.eternal-september.org> <11ect54$20qpr$3@dont-email.me> <klFOS.164599$ZAo7.102690@fx18.iad>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: David Brown <david.brown@hesbynett.no>
Newsgroups: comp.lang.c
Subject: Re: C and its peasant 'ancestors'
Date: Sat, 28 Nov 2026 20:34:10 +0100
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <11efabi$2rvk1$2@dont-email.me>
References: <11dup6q$v4j9$1@dont-email.me> <11e8stp$hajr$1@dont-email.me>
 <11e8ti0$hhqa$1@dont-email.me>
 <11e8v24$i2mc$2@raubtier-asyl.eternal-september.org>
 <11e9045$ihk3$1@dont-email.me> <11e90a8$ikh0$1@dont-email.me>
 <11e90mv$io87$2@raubtier-asyl.eternal-september.org>
 <11e91ns$j5dv$1@dont-email.me>
 <11e92ff$jclo$1@raubtier-asyl.eternal-september.org>
 <11e95j2$kimu$1@dont-email.me>
 <11e96aa$kpta$1@raubtier-asyl.eternal-september.org>
 <11ect54$20qpr$3@dont-email.me> <klFOS.164599$ZAo7.102690@fx18.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 28 Nov 2026 19:34:11 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="3014273"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/z/Sm2/K7Yj800QfJBM9OKrfsGYPypdxA="; posting-host="830fabbfeda36f3c3fabbdfcbd22e3d2"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:rryJYbWVFjWgNS+me0qbP5m9CHA= sha256:/4yco8o1Uno5ZZp/y0sw4TrfXcUpzElC09E0KpGvorg=
	sha1:qQ4QYLBlpEkZFa5l1i+f2iqiV/g= sha256:El/Kp0pHMzHleEoTUdcgsXsefaG1BGwM2MYFWBy3H+M=
Content-Language: en-GB
In-Reply-To: <klFOS.164599$ZAo7.102690@fx18.iad>