Aftur í samfélagið
u/amelied1
10 mán síðan

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

Athugasemdir

Hafðu umræðuna málefnalega, skýra og auðvelt að fylgjast með henni.

3
Skráðu þig inn til að taka þátt í umræðunni
Svaraðu, vistaðu og fylgdu þræðinum þegar þú hefur skráð þig inn.
S
sophia_müller
10mán síðan

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 síðan

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 síðan

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