> Then I saw Ziex and I was amazed. It never occurred to me that the JSX approach could be done outside of JavaScript.

It never occurred to me, either! This is really neat! How does it work?

EDIT: Never mind, seems like it's a custom file format that gets compiled to Zig code. Still quite neat but unfortunately you lose all the IDE support.

There are `rsx` macros in Rust that work with a regular `cargo build` and retain IDE support.

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.

LLMs are decent at building LSPs so, shouldn’t be a problem if this becomes popular.