4 ms·
What's the magic number of LOC that any markup language should be implemented under?
by btn 16y ago
What's the magic number of LOC that any markup language should be implemented under?
- tedunangst 16y agoTo put 10k in perspective, that's substantially more than the pcc C compiler front end, and closing in on the compiler's total line count. When I consider what I can accomplish using C vs what I can accomplish using HTML, that doesn't appear to be the expected result.
- plorkyeran 16y agoC compilers don't have to deal with users that expect purely random garbage thrown at the parsers to have a "valid" parsing that's consistent across every implementation. Unfortunately, making a language simple to use by not requiring that users get everything right makes it very hard to implement.
- j-g-faustus 16y agoConsidering the number of people that can accomplish anything useful with HTML vs the number of people that can accomplish anything useful with C (or even XML), it's well in line with my expectations. It's fairly easy to get a simpler implementation by shifting complexity from the parser to the user. But from a "total society productivity" standpoint, having a handful of developers spend a few months to implement a resilient parser is a cheap price to pay to have umpteen million people save hours of debugging for every page they create.
- sethg 16y agoBack when HTML was invented, it was based on SGML. In retrospect, this was a fundamental design flaw. SGML has all sorts of fillips that were intended to make documents easy to type (back in the pre-GUI era) but which in practice make them hard to parse. SGML parsers, even parsers built into expensive commercial software, were famous for not reliably interoperating. The HTML5 spec abandons SGML entirely because, as it turned out, even those fillips of SGML did not make it possible for browsers to consistently agree on how to parse HTML in the wild. It would have been better for everyone if HTML had used a bog-simple Lisp-like format from day one, but without a time machine we’re stuck with these kludges of history.
- deleted 16y ago[deleted]