Live data from Hacker News

Don't Invent XML Languages (2006)

tbray.org

1–10 of 99 posts

Re: Don't Invent XML Languages (2006)

#3

I don't even know why we have any *ML. Everything they can do can be done with Lisp-syntax better.

S-expression still needs a schema. Just as you can't say "use XML", neither you can say "use S-expression". Most of work of defining DocBook is about defining DocBook schema, not about defining DocBook XML syntax.

Re: Don't Invent XML Languages (2006)

#5

I don't even know why we have any *ML. Everything they can do can be done with Lisp-syntax better.

XML is a document markup language. As in, articles and books n stuff. How in hell is that comparable to anything "Lisp-syntax"?

There's plenty of history of s-expression formats for documentation. One example is: 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.

Re: Don't Invent XML Languages (2006)

#6

I don't even know why we have any *ML. Everything they can do can be done with Lisp-syntax better.

This argument has been made in one form or another for decades. There are good reasons it hasn't prevailed. S-expressions are clumsier at expressing semistructured data that is primarily strings, which is what markup languages were designed for.

Whether you think S-expressions are superior probably depends on the use case you have in mind. And there's a good chance it's not the use case you should be optimizing for.

Re: Don't Invent XML Languages (2006)

#8
2006, well into the era of XML being the trendy fad that every piece of Serious Business software was supposed to use.

Now 18 years later, JSON seems to have displaced it.

Personally, I've never found text-based formats to be a good choice for data that humans will rarely need to read or write; I much prefer simple and efficient binary formats, which can be just as extensible without the additional inefficiency and needlessly-introduced-failures of string handling.

Re: Don't Invent XML Languages (2006)

#10
post #9

Side question: when did XML start to loose favour to JSON? Did this happen because of something in particular or was it a gradual transition?

I could be wrong, but I recall that during the early AJAX days, there was a bit of a XML v JSON war that ended up with JSON winning. Some stated cases for JSON was that it was less verbose and therefore cheaper to send over the wire, among other stated advantages.

I'm sure there were plenty of other sources of fatigue like XHTML Schemas etc...

Post reply on HN