Rendered at 11:32:28 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
teo_zero 4 hours ago [-]
There are a couple of constructs that you end up re-creating as soon as you need non-trivial preprocessing.
One of those is the two-stage CAT, another one is the NARG the article talks about.
__COUNTER__ is going to be added to C29, the next version of the standard, maybe there's hope for __VA_COUNT__ and __CAT__ too!
0c3ca83 1 hours ago [-]
Doing non-trivial preprocessing is a mistake. It's probably a good idea to pretend that the only preprocessing directive is #include. With constexpr, even #define is obsolescent.
HexDecOctBin 3 hours ago [-]
Has anyone tried to extend the C Preprocessor to be a fully turing complete language (perhaps something like Snobol) to allow for Terra like meta-programming?
(I am not talking about metalang99 or Cello like stuff, which exploits the Turing tarpit of the currently specified preprocessor but rather tasteful additions to the preprocessor itself).
One of those is the two-stage CAT, another one is the NARG the article talks about.
__COUNTER__ is going to be added to C29, the next version of the standard, maybe there's hope for __VA_COUNT__ and __CAT__ too!
(I am not talking about metalang99 or Cello like stuff, which exploits the Turing tarpit of the currently specified preprocessor but rather tasteful additions to the preprocessor itself).