Hacker News new | ask | show | jobs
by butterisgood 1516 days ago
I don't think many Zig programmers miss C macros. Comptime is extremely powerful.
1 comments

C 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
If 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 in regular zig rather in an external preprocessor.
I 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.