News for hackers. Stuff that matters.
Re:30 Years of <Br> Tags by nextaccountic on Wednesday December 17, 2025 @04:11AM (#46299779)
There was a system with dependent types that ruled out invalid html at compile time, even dynamically generated html (rather than a runtime error, you would get a compile error if your code did something wrong)

https://github.com/urweb/urweb

http://www.impredicative.com/ur/

Needless to say it wasn't very practical. But there was one commercial site written in it https://github.com/bazqux/bazqux-urweb (the site still exists but not sure if it's still written in ur/web)

Re:30 Years of <Br> Tags by vshabanov on Wednesday December 17, 2025 @04:16PM (#46305610)
It's still written in Ur/Web. And the type-safety of Ur/Web is the reason I started writing it -- I couldn't imagine myself using untyped JavaScript.

Ur/Web is not very practical for reasons other than type safety: the lack of libraries and slow compilation when the project gets big. The language itself is good, though.

Nowadays, I would probably choose OCaml. It doesn't have Ur/Web's high-level features, but it's typed and compiles quckly.

Re:30 Years of <Br> Tags by nextaccountic on Friday December 19, 2025 @09:03AM (#46325952)
Whoa, that's cool!

What do you think about Typescript? I mean it's unsound but - it sounds like an ok compromise

Re:30 Years of <Br> Tags by vshabanov on Sunday December 21, 2025 @12:56PM (#46346699)
Didn't use TypeScript, so can't say much. I guess some types are better than no types, and it's easier to use for JavaScript developers.

Personally, I'd prefer a fully typed language.