Re:The two types of C programmers (a provocative thesis)
by sparkie on Sunday April 23, 2023 @03:50PM
(#35679836)
Thanks. My root comment mentioned that it was not really the features of C that I depended on, but the GCC specific features.
I'm interested in using D now as sibling comment mentions that I can use some of these features in gcd, but I'm not yet sure how much benefit I'd get over using C by using a subset of the D features which are compatible with the constraints of my VM.
Re:The two types of C programmers (a provocative thesis)
by WalterBright on Sunday April 23, 2023 @05:22PM
(#35680768)
One big feature is D has modules. There's no reason C can't have modules, but they don't. You don't need to code .h files anymore.
Re:The two types of C programmers (a provocative thesis)
by mhh__ on Monday April 24, 2023 @02:26PM
(#35691258)
LDC and GDC both have the section concept exposed as a UDA.
Re:The two types of C programmers (a provocative thesis)
by WalterBright on Monday April 24, 2023 @02:40PM
(#35691429)
Good!
D's inline assembler does register management for you, i.e. it tracks register usage through the instructions, so you don't have to say which registers are read or written to.
D does not support the "section" extension. I understand that certain gcc C extensions are needed for special purposes. Gcc may be the most suitable language if you need those extensions.
What I would do is use gcc for the parts of the code that need those extensions, and D for the rest (D code can directly interact with C code).