3 ms·
> The fact that SGML-based formats managed to become as popular as they are is really proof that there's something fundamentally rotten in software engineering.
by goto11 6y ago
> The fact that SGML-based formats managed to become as popular as they are is really proof that there's something fundamentally rotten in software engineering.
HTML is a pretty good syntax though. SGML-like syntax is just less appropriate for formats which are not text-centered, since the element/attribute distinction becomes superfluous noise in the syntax.
- simias 6y agoI agree, HTML is fine (still a bit too verbose IMO, in particular having to repeat the tag to close it always felt useless and very noisy). But HTML is a markup language, the problem is that for some insane reason a big chunk of the industry at some point decided that XML was a reasonable serialization format. That's where it went really wrong IMO.
- goto11 6y agoIn HTML you can leave out the end tag in cases where they can be unambiguously inferred, like: <p>First paragraph<p>Second paragraph</p> P-element can't be nested, so a <p> will automatically close the previous p-element. But this also means it is necessary to indicate the tag name in the closing tag. For example this would be ambiguous: <div><p>Hello</> It cannot be inferred if it is the div or p which is closed. XML is of course different. Since all element have to be explicitly closed, repeating the tag-name in the close tag is in principle superfluous. I think it makes it easier to read though, at the cost of more effort to write.