logoalt Hacker News

singpolyma3today at 1:21 PM3 repliesview on HN

To be fair, HTML5 also has a defined parsing algorithm. It just happens to always work on any input to produce a webpage


Replies

jerftoday at 2:05 PM

Yes, this is what you'd want. It doesn't have to be a complicated as the HTML5 algorithm either. That's complicated because it was a harmonization of at least 3 browser's multi-decade heuristics and untold terabytes of existing HTML practice. An algorithm unconcerned with backwards compatibility could much simpler, but still clearly define error behavior much easier to use than "scream and die".

And it's still unambiguous. You can cringe at what some people do, but it would be strictly a taste issue rather than a technical one, as the parse would still be unambiguous. And if you think you can fix taste issues with technical specification, well, you've already lost anyhow.

masklinntoday at 4:02 PM

I don't get this reply. GP didn't say anything about parsing algorithms, they said (correct) things about hard errors on the web.

show 2 replies
stavrostoday at 2:01 PM

I think the GP has an issue not with the specification part, but with the part where it's forbidden for clients to render a noncompliant page.

show 1 reply