I love Rust, and will happily defend its type system and ownership model until I...
Quin @TheQuinbox@dragonscave.space
I love Rust, and will happily defend its type system and ownership model until I'm blue in the face. But can we collectively admit that its macro system is an absolute nightmare, especially when compared to something like Zig's comptime? Writing declarative macro_rules! feels like summoning an ancient DSL through a maze of $()*+, and proc macros require you to make a secondary crate for your pre-existing crates, as well as compiling in syn, procmacro2, and quote just to generate basic code. Feels like a good supply chain attack vector actually...
Half the time I can't even stand to read or debug complex macros myself; I just offload the deciphering to Claude Code because parsing token trees by ear is a form of cruel and unusual punishment.
Meanwhile, Zig just... uses Zig. You want metaprogramming, generics, type reflection, or conditional compilation? Write regular code inside a comptime block and let the compiler do the work with normal control flow, normal syntax, and normal errors. Rust makes very important things, like memory safety, rock-solid, which Zig doesn't, at least to the same degree. But the moment I cross into metaprogramming in Rust, it feels like I'm fighting the language to the death. Zig proved you don't need a separate, hideous mini-language just to do powerful compile-time logic, and I love it.