3 ms·
For me, it is hard to imagine to program in C without preprocessor metaprogramming. Obviously, it would be better if generic types and metaprogramming were avai
by zajio1am 4y ago
For me, it is hard to imagine to program in C without preprocessor metaprogramming. Obviously, it would be better if generic types and metaprogramming were available directly in the language. Alternative is either copying code and adapting it manually, or depending on generic code with many void * arguments.
- WalterBright 4y agoIf one really needs metaprogramming, it's time to move to a more powerful language. There are plenty of them.
- arinlen 4y ago> If one really needs metaprogramming, it's time to move to a more powerful language. It's wholly wrong to try to frame this as "more powerful", specially considering the fact that C already supports generic selection. https://en.cppreference.com/w/c/language/generic https://en.cppreference.com/w/c/language/generic > There are plenty of them. There really isn't, at least in the application domains where C dominates, such as embedder programming. You'd be hard pressed to find any producrion-level tool chain for embedded development which supports anything other than C or even C++, and any decision to pick up even C++ over C for embedded development requires a lot of soul searching.