> Zig has no macros and no metaprogramming
but then in another place about zig[1]:
> Compile-time reflection and compile-time code execution
This does sound arbitrary more complex than macros (and is what actually got me interested in zig).
> Zig has no macros and no metaprogramming
but then in another place about zig[1]:
> Compile-time reflection and compile-time code execution
This does sound arbitrary more complex than macros (and is what actually got me interested in zig).
* https://github.com/bluenote10/nim-stringinterpolation/blob/m... This one does string interpolation and a printf-like syntax with compile time type checking. It does call out to C but only after it's already parsed and validated and transformed the format string.
* https://github.com/kaushalmodi/strfmt/blob/master/strfmt.nim This one implements a more complex string formatting syntax with lots of convenience functions. It's more complex but provides a lot more functionality than the previous one without relying on FFI.
I'm not a Nim programmer but I imagine those two demonstrate how Nim metaprogramming works even if neither exactly duplicates the behavior of printf.