Moving DOM implementation to Zig feels like swimming upstream
The Lightpanda team switching their DOM implementation to Zig is either brilliant or slightly mad – probably both. I get the appeal: better memory control, faster compilation than C++, catching bugs at compile time. But here's what bothers me about this choice.
You're essentially betting your entire rendering engine on a language that's still pre-1.0, with a tiny ecosystem and almost no one who knows it well. Sure, the technical benefits look good on paper. But when you hit a weird edge case at 2am, where's your Stack Overflow? Where are the battle-tested libraries?
The DOM is complicated. Thousands of subtle behaviors, decades of browser quirks to replicate. Rewriting it means re-discovering every landmine that Mozilla and Chrome teams already stepped on. In a language where the expert community fits in a small conference room.
Maybe I'm too risk-averse, but this feels like choosing hard mode when normal mode is already challenging enough.
I'm actually curious how they're handling the spec compliance part – like, are they literally translating from their old codebase or starting fresh? Because that sounds like a nightmare either way.