4 ms·
XML is a document markup language. As in, articles and books n stuff. How in hell is that comparable to anything "Lisp-syntax"?
by otabdeveloper4 3y ago
XML is a document markup language. As in, articles and books n stuff.
How in hell is that comparable to anything "Lisp-syntax"?
- fiddlerwoaroof 3y agoThere's plenty of history of s-expression formats for documentation. One example is: https://github.com/Clozure/ccl/tree/master/doc/manual https://github.com/Clozure/ccl/tree/master/doc/manual But, also, there's plenty of uses of XML that are not "artcles and books". For example, Maven's pom.xml and log4j2.xml.
- lelanthran 3y agoBecause lisp syntax (s expressions) are a cleaner and terser superset of all markup languages, and even of JSON-like representations. IOW, if you take Lisp expressions, add cosmetic syntactical changes like angle brackets and closing tags, then remove about 90% of functionality and cripple what's left, you'll have XML. Cripple it further and you'll have JSON.
- quonn 3y agoWhat you call crippling is what makes JSON easy to work with and universally adopted.
- lelanthran 3y ago> What you call crippling is what makes JSON easy to work with and universally adopted. For some specific tasks, certainly. A tool I am developing for myself cripples the input format even more, because the more reduced the input is the easier it is to use for a specific task. Could I have used a more powerful format? Sure, but then a format that allows too much is harder to use (especially when those extra features aren't needed). The scope of the input should match the scope of the problem. I was only pointing out that, at the highest level, the format that allows everything is Lisp s-expressions. Everything else is a less-abled form of s-expressions. Some of those formats would have been best served by simply being s-expressions instead (like XML), while others (like JSON) serve a different purpose and don't need all those extra features.
- jeeeb 3y ago> Because lisp syntax (s expressions) are a cleaner and terser superset of all markup languages I don’t really follow this. What makes s-expressions a superset of markup languages? What can’t you express in XML that you can with s-expressions?
- kitd 3y agoBoth have ASTs are just a DAG of nodes. The only difference is what they look like in human-readable form, and how people expect to use them.