4 ms·
I once saw someone suggest using PHP as a C preprocessor, which is hilarious in a way.
by cozzyd 7y ago
I once saw someone suggest using PHP as a C preprocessor, which is hilarious in a way.
- burfog 7y agoThere are other choices: #script javascript // put your script here, have it change the parse tree, etc. #endscript Microsoft compilers could support VBscript. High-performance options include webassembly, the JVM, and the .net runtime.
- makapuf 7y agoWould be nice to allow it in gcc/clang in a standard way to access the parse tree. In C even maybe ?
- makapuf 7y agoYes, the main issue is not the language its the Revel at which it operates (text vs tokens or ast) What I wouldn't mind is more widespread adoption of other preprocessing steps, in whatever language, be it scheme or python.
- zbuf 7y agoI'm using the C preprocessor as a preprocessor to JSON, also hilarious. But whoever thought a language with no comments was a good idea -- means I can actually write comments in JSON files.