Tillbaka till communityn
u/amelied1
10mån sedan

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

Kommentarer

Håll diskussionen saklig, tydlig och lätt att följa.

3
Logga in för att delta i diskussionen
Svara, spara och följ tråden när du har loggat in.
S
sophia_müller
10mån sedan

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
10mån sedan

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
10mån sedan

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