4 ms·
Have you ever had to write an HTML5 parser, or read the spec? It's hysterical. The spec formalizes the parsing of common errors. There are rules for parsing mal
by Animats 3y ago
Have you ever had to write an HTML5 parser, or read the spec? It's hysterical. The spec formalizes the parsing of common errors. There are rules for parsing malformed comments. There are rules for handling bad syntax.
The XHTML vision was that people would write it in a XML tree editor, which takes care of the nesting and syntax. Then you can't get the syntax wrong. There are JSON tree editors like that. But everybody wanted to use text editors. Tree editors exist, but have never been popular for some reason. Org mode is probably the most popular form of tree editor.
I'm surprised there isn't a move to write HTML in JSON syntax.
- marcosdumay 3y ago> I'm surprised there isn't a move to write HTML in JSON syntax. JSON doesn't support sum types, and HTML (like all of XML) is all about sum types. Besides, the quotes everywhere are a step into "more annoying", not less. So, no, I don't think that move will ever happen.