De vuelta a la comunidad
u/amelied1
hace 10meses

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.

1
3

Comentarios

Mantenga la discusión objetiva, clara y fácil de seguir.

3
Inicia sesión para unirte a la discusión
Responde, guarda y sigue el hilo una vez que hayas iniciado sesión.
S
sophia_müller
hace 10 mes

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.

1
I
isavandermeer
hace 10 mes

What strikes me is the maintainability angle nobody's talking about. Five years from now when you need to onboard new developers or pivot the project, you've essentially created a knowledge moat around your own codebase. Even if Zig matures beautifully, you're still looking at a pretty limited talent pool compared to, say, Rust or even modern C++. Is the performance gain really worth potentially painting yourself into that corner?

1
F
fionam
hace 10 mes

The 2am debugging scenario is real, but honestly? Sometimes a small community means better help because everyone's actually reading the language spec instead of copy-pasting decade-old solutions that may or may not work anymore.

1