3 ms·
It kinda happened with markup languages. HTML, SVG, and some other domain specific markup languages are all XML, which is a subset of SGML. The thing there is
by mcdonje 1y ago
It kinda happened with markup languages. HTML, SVG, and some other domain specific markup languages are all XML, which is a subset of SGML.
The thing there is those DSLs have their own specs.
Coding is a social activity. Reading code is hard. When there are multiple ways of doing things, it's extra hard. People want to have relatively standardized ways of doing things so they can share code and reason about it easier.
If there's a lisp or racket or a forth that's defined as a DSL, it might take off if it's standardized and it's the best solution for the domain.
- gldrk 1y agoHTML uses a ton of SGML features not part of XML (sometimes erroneously though to be non-standard ‘tag soup’, not to mention self-closing tags). You need either a specialized parser or an SGML processor + DTD.
- shawn_w 1y agoWasn't HTML4 the last one defined as a SGML DTD? 5 and on is its own beast. (rip XHTML)
- gldrk 1y agoYou are right. There is a third-party DTD that should be mostly compatible (https://sgmljs.sgml.net/docs/html5.html https://sgmljs.sgml.net/docs/html5.html). In reality, HTML4 was never implemented to the letter by user agents, because people do things like putting -- inside comments.