Minimal druntime?

Paulo Pinto pjmlp at progtools.org
Sun Jul 28 17:44:38 UTC 2019


On Sunday, 28 July 2019 at 16:13:10 UTC, Ethan wrote:
> On Sunday, 28 July 2019 at 12:00:19 UTC, Paulo Pinto wrote:
>> I am referring to the ISO C89 subset of the ISO C++98 
>> programming language. which is now updated to the ISO C89 + 
>> ISO C11 libraries as of ISO C++17, and will be updated to some 
>> C90 language constructs like aggregate initializers in ISO 
>> C++20.
>
> Okay, but you understand that C++ was specifically designed as 
> a superset of C, right? It's the exact opposite of my point. 
> C++ added features to C; HPC# and -betterC remove them from 
> their respective languages.
>
> Your point that C is what you use to write faster code than C++ 
> is also misguided. I regularly write much faster code in C++ 
> than I ever could in C thanks to heavy use of inlining and 
> templates. This is even more true historically on (for example) 
> 32-bit Windows systems, where the C ABI was very stack-heavy 
> yet I could use things like __fastcall to call functions with 
> parameters in registers and avoid the stack entirely.

So here goes another example, disabling exceptions and RTTI, 
which is considered UB as per ISO C++ standard, given that the 
standard assumes those features cannot be turned off and the 
standard library (as per ISO C++ document) does require them 
being present.

Or constraing to subsets like Embedded C++ used by Apple's IO Kit.

Disabling exceptions and RTTI, coupled with an alternative 
library like EASTL, or Embedded C++ existance, do follow the same 
spirit as HPC# and -betterC.


More information about the Digitalmars-d mailing list