4 ms·
I humbly agree unless, of course, there is no other solution, e.g. lack of compilers on your platform.
by d_tr 5y ago
I humbly agree unless, of course, there is no other solution, e.g. lack of compilers on your platform.
- WalterBright 5y agoEven so, I used to do a lot of metaprogramming with the C preprocessor back in the day. Over time, I grew disillusioned with it and gradually removed it from my C code. It just wasn't worth it. P.S. I also did metaprogramming in C by writing C programs to generate C code, such as converting an array of structs to multiple arrays, one for each field (for efficiency). This worked out fairly cleanly, but with D's ability to run functions at compile time, I was able to put this back into the main program.
- touisteur 5y agoI'm curious of your opinion about AdaCore CCG, an SPARK to C compiler, for targets that don't have an Ada compiler yet.
- WalterBright 5y agoI do not know enough about them to have a worthwhile opinion.
- touisteur 5y agoOK sorry :-) thanks