So use the C standard library instead of the C++ one. You still get RAII / constructors/destructors and runtime polymorphism, along with stronger compile-time type safety.
I frequently do that myself on simple C++ programs just for compile time reasons alone, where I'll use stdio.h instead of std::iostream or std::format.
Re:A Modern Web App in C
by kevin_thibedeau on Monday October 12, 2026 @11:16PM
(#50066171)
Designated initializers are gimped in C++;
Re:A Modern Web App in C
by throw16180339 on Tuesday October 13, 2026 @12:48PM
(#50074737)
C++ 20 added designated initializers, but the fields have to be specified in declaration order.
Re:A Modern Web App in C
by kevin_thibedeau on Tuesday October 13, 2026 @01:10PM
(#50075144)
It partially added them. You can't use them out of order or skip members nor can you use the array initializers.
Large portions of the standard lib depend on heap allocations. C is a much safer target for environments with limited resources.