News for hackers. Stuff that matters.
Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by hsivonen on Friday April 13, 2018 @01:32PM (#16832091)
> Wouldn’t it have been easier if all tags were either ending in /> or followed by a closing tag?

Not really.

> Wouldn’t it have been easier if the syntax was formally defined as ABNF, and could be translated into code in a matter of days?

No, working from an spec written as an algorithm is easier than working from ABNF plus some inconvenient prose constraints.

(With the exception of template element support, I wrote the HTML parser used in Firefox and Validator.nu.)

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by kuschku on Friday April 13, 2018 @02:55PM (#16832902)
> No, working from an spec written as an algorithm is easier than working from ABNF plus some inconvenient prose constraints.

That sounds very unlikely.

I’ve implemented my own parsers for countless specs – plaintext or binary, and the parsers that are written as imperative algorithms are insanely complicated to implement as functional implementations.

I end up with horrifying code, while the specs written as ABNF are much easier to translate into pattern matching code.

The specs written as algorithm only work fine for a single type of implementation IME, while the ABNF specs work equally well for all types.