3 ms·
I don't think many Zig programmers miss C macros. Comptime is extremely powerful.
by butterisgood 4y ago
I don't think many Zig programmers miss C macros. Comptime is extremely powerful.
- FrozenVoid 4y agoC macros are powerful enough to create entire functional languages at compile time, which is far beyond any constexpr functions. https://github.com/rofl0r/order-pp https://github.com/rofl0r/order-pp
- nyberg 4y agoIf it's at compilation time, you have the full zig language so you certainly could implement your very own functional programming language https://github.com/igmanthony/zig_comptime_lisp https://github.com/igmanthony/zig_comptime_lisp in regular zig rather in an external preprocessor.
- anonymoushn 4y agoI do think comptime is worth a look for you, even if my comment elsewhere in this thread admits that it can't quite do everything you do with C macros.