4 ms·
C macros are powerful enough to create entire functional languages at compile time, which is far beyond any constexpr functions. https://github.com/rofl0r/ord
by FrozenVoid 4y ago
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 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.