4 ms·
Yes, this is the same approach Ryan Fleury and others advocate, and it's perfectly good: > Arbitrary compile-time execution in C: > cl /nologo /Zi metaprogram
by modernerd 2y ago
Yes, this is the same approach Ryan Fleury and others advocate, and it's perfectly good:
> Arbitrary compile-time execution in C:
> cl /nologo /Zi metaprogram.c && metaprogram.exe
> cl /nologo /Zi program.c
> Compile-time code runs at native speed, can be debugged, and is completely procedural & arbitrary
> You do not need your compiler to execute code for you
https://x.com/ryanjfleury/status/1875824288487571873 https://x.com/ryanjfleury/status/1875824288487571873
- chikere232 2y agoMS DOS choice of / for commandline arguments and \ for paths always hurts my eyes
- zamalek 2y agoThe only benefit that some (certainly more rare) compilers can provide is type metadata/compile-time reflection. Otherwise, totally.
- account42 2y agoThis gets unwieldy quick as soon as your compiler host and target are different platforms.