Re:Zig's Comptime Is Bonkers Good
by chikere232 on Tuesday January 07, 2025 @04:27AM
(#42620805)
MS DOS choice of / for commandline arguments and \ for paths always hurts my eyes
The only benefit that some (certainly more rare) compilers can provide is type metadata/compile-time reflection. Otherwise, totally.
> 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