News for hackers. Stuff that matters.
Re:Type-safe HTML templating in Zig by fergie on Tuesday October 13, 2026 @03:51AM (#50068192)
> It would tie in an additional feature with potential future incompatibilities

No offense but this is a bit of a non-argument that could be applied to just about any development in HTML.

> There’s also just not a super great reason to do it.

Most web dev frameworks exist in large part to solve the problem of templating. (yes, they do other stuff, but templating is the central problem that they are solving)

Re:Type-safe HTML templating in Zig by everforward on Tuesday October 13, 2026 @10:18AM (#50072198)
It does apply to all HTML dev, my point is more the idea that more features means more changes and more incompatible versions (and thus more strife).

HTML is actually shockingly backwards compatible. I very rarely see pages so old they won’t render. The main exception is basically exactly what I’m talking about: Flash and ActiveX, that had to be abandoned for security (and some poorly advised iframe stuff).

> Most web dev frameworks exist in large part to solve the problem of templating.

This might be an agree to disagree area. Most web dev frameworks I’ve seen exist to make dealing with state easier. They do templating because you have to put the state somewhere, but the magic is all in the state.

There are some that only do templating, but they’re pretty rare. Hugo or Jekyll come to mind, though “web dev framework” is probably overselling them.

There are also web components, which sound vaguely like what you’re talking about. They’re not crazy popular, but they exist and work. The security boundaries make it kind of a nightmare, I remember having to do something weird to inject Tailwind into them because they’re isolated from global CSS. The kind of things you have to do when securing templates at runtime instead of compile time.

Re:Type-safe HTML templating in Zig by fergie on Wednesday October 14, 2026 @02:32AM (#50083261)
Agree that handling state is also a big part of js frameworks.