Live data from Hacker News

Forking HTML into a static language doesn't make sense

robert.ocallahan.org

21–30 of 94 posts

Re: Forking HTML into a static language doesn't make sense

#21

Forking HTML might not make sense indeed, but I think this post doesn't make a compelling point as to why or why not.

If you step back a little what we have today is a combination of a common browser implementations (aka. the DOM tree + render logic) and bunch of standardized parsing and interpretation logic that maps textual versions of CSS and HTML to this. For better or for worse, this stuff is standardized via WhatWG & W3C as well as the three remaining browser engines (chromium, gecko, and safari) whose intersection of behavior…

> The business of rendering static text to a browser is kind of a solved problem. It's everything else that's kind of hard to deal with via a DOM api. WASM is breaking this discussion wide open as suddenly people are porting decades worth of native code to run in a browser.

If it is so hard to layer a coherent and not laughably overcomplicated runtime on top of a document viewer in 20 years, then it follows that it probably wasn't such a good idea to begin with. Unless you're hellbent to freeride on the web's success, and ruining it in the process. At which point we're trying to solve an economic problem (someone else's) via a technical solution.

To get a sense how far of the mark browsers still are, you only have to look into the problem of rich text editing on browsers, which is a natural step up from pure text browsing, and something the first browser did already. Today, this is only barely possible thanks to a couple rich text editor projects who made heroic efforts to work out browser quirks (with contenteditable such that the browser's spellchecking can be leveraged, or alternatively using Canvas/WebGl, essentially developing a browser-in-browser).

In a situation where browser vendors struggle to keep up, adding additional tech such as WASM is the last thing you want to do. When and if WASM gets even basic language infrastructure such as gc, DOM or WebGl bindings, or anything even mildly interesting, then it'll immediately become another maintenance problem. And as you said yourself, at best WASM can help port apps over to a browser. It's however not clear what the purpose of that exercise should be when said apps run just fine outside the browser. I'd say if there were indeed so many apps waiting to be ported over to running in the browser, then there have been sufficiently sophisticated transpilers for like 15 years now (emscripten, gwt, many others), so I'm not buying that as an argument to make browsers even more complex.

Re: Forking HTML into a static language doesn't make sense

#22
post #16

> Quite often someone proposes something like this Who says this? I mean is it worth to write a response to some vague idea that no serious person has actually put forward?

>Who says this?

Several people. If you follow HN and geek blogs, it comes up often...

Re: Forking HTML into a static language doesn't make sense

#23
From my perspective, the reason to have a language for static documents is parsability. With HTML5+CSS+JS, there are few organizations at the scale which can sustain making something like a web browser, a general-purpose web crawler, a11y tools, or similar.

Could it be a common language? Perhaps. I liked HTML2. I hated basically everything which went into HTML3 and HTML4. HTML5 has made a lot of good progress on rolling this back, but we're not there yet. It's possible to write parsable HTML5, but most organizations don't do it, and the ones which do don't have common ways to do it.

It's hard to remember, but back in the HTML2 days, the web had a certain type of client-side programmatic experimentation which is absent today. Anyone could write a tool which would grab things from the web and do meaningful things with them, and many people did. Google evolved from Altavista, which was a tech demo at DEC.

To be clear: The web is a lot more programmatic today in a general sense (client-side browser extensions, AJAX APIs, embedding webkit, etc. etc. etc.), but one part of that flexibility is gone, and it was important.

Re: Forking HTML into a static language doesn't make sense

#25

Earlier quoted context omitted.

I think this is an interesting and important argument, because I always felt many shortcomings of the modern web were actually caused by browser vendors and their reluctance to improve their platforms and the web. We have so many custom UI Elements, because forms did and still do suck. RSS always had a back seat, because it always was second class in browsers. Semantic web died outside of search engines, because brow…

I find the projects that the W3C chooses to work on incomprehensible.

The projects that SDOs decide to work on are those which people there are willing to spend their time on.

An SDO could say "we're doing project X", but if nobody shows up…

Re: Forking HTML into a static language doesn't make sense

#26

HTML doesn't need to be simplified to reign in the complexity. Rather, it needs to be completed as a hypertext, so that people can build complete software systems using (only or mostly) that language. See the htmx examples page for stuff that should be doable in plain HTML: https://htmx.org/examples/ The fact that only anchor and forms, only clicks and submits, only GET and POST and only full page replacement is avai…

I think this is an interesting and important argument, because I always felt many shortcomings of the modern web were actually caused by browser vendors and their reluctance to improve their platforms and the web. We have so many custom UI Elements, because forms did and still do suck. RSS always had a back seat, because it always was second class in browsers. Semantic web died outside of search engines, because brow…

You want "Save to my calendar" but we still don't have full support for date inputs. Chrome has supported the main features since 2012, Firefox joined only in 2017, and we're still waiting on Safari to make a move.

https://caniuse.com/#search=input-date

Re: Forking HTML into a static language doesn't make sense

#27

Earlier quoted context omitted.

I think this is an interesting and important argument, because I always felt many shortcomings of the modern web were actually caused by browser vendors and their reluctance to improve their platforms and the web. We have so many custom UI Elements, because forms did and still do suck. RSS always had a back seat, because it always was second class in browsers. Semantic web died outside of search engines, because brow…

You want "Save to my calendar" but we still don't have full support for date inputs. Chrome has supported the main features since 2012, Firefox joined only in 2017, and we're still waiting on Safari to make a move. https://caniuse.com/#search=input-date

Well, I wanted "Save to my calendar" when our self-built date inputs still opened new windows with html tables as calendars to pick a date, but I get your point and I lumped this under "forms suck". I still shudder when thinking about implementing multi-file uploads in php.

Re: Forking HTML into a static language doesn't make sense

#28

Earlier quoted context omitted.

I find the projects that the W3C chooses to work on incomprehensible.

The projects that SDOs decide to work on are those which people there are willing to spend their time on. An SDO could say "we're doing project X", but if nobody shows up…

Sure, but htmx is small (~1.7K loc[1]), written mostly by one guy part time and, while not perfect, advances HTML significantly as a hypermedia. That something like this hasn't been discussed in a significant, public manner by the w3c in over a decade[2] indicates to me there is either a lack of understanding or of interest in advancing HTML as a hypermedia.

I readily admit I may be missing something.

[1] - https://github.com/bigskysoftware/htmx/blob/master/src/htmx....

[2] - https://en.wikipedia.org/wiki/XHTML#XHTML_2.0

Re: Forking HTML into a static language doesn't make sense

#30
Developers can already do this. They can just use HTML. Plain old HTML. They don't have to use JavaScript. They don't have to use CSS. They can just use plain boring HTML. That they can do this now makes me ask the question: what problem are we solving? If people aren't using the existing solution enough, and the existing solution solves the "issues" of CSS and JavaScript being used, then what is the problem?
Post reply on HN