← Back to context

Comment by tancop

5 hours ago

That's because Zig explicitly doesn't want any kind of Rust or C style macros, so anything like this has to live in a build script most IDEs won't run. Maybe one day there will be a Zig IDE that takes advantage of the fast compiler.

I think there is a way to do syntax extensions cleanly, with a special block type like `'{ }` that gets tokenized and passed to a comptime function skipping the parser. But one of Zig's main selling points is no hidden control flow and they want to keep it that way.