Hacker News new | ask | show | jobs
by AnimalMuppet 23 days ago
1. What, in your view, are the right reasons to hate XML?

2. To me, verbosity and aesthetics seem like perfectly valid reasons to hate XML. Once you learn S expressions, XML looks disgusting. They implemented half of Common Lisp in a markup language.

2 comments

> They implemented half of Common Lisp in a markup language

Come on, S expressions are just trees, they are not God's gift to humankind.. and just because a language has an AST (surprise, a tree again!) doesn't make it a lisp. I can write a C program's AST as sexprs or a Haskell program's, yet neither will be a lisp.

S expressions are just trees. XML is just trees. But S expressions are much less verbose trees. Once you see that they're both trees, then XML looks disgustingly verbose.

XSLT is what I meant by "half of common Lisp". It's probably an exaggeration, but once you can use XML to transform XML trees into other XML trees...

The right reason to hate XML would be some technical limitation or technical issues with it. But XML works quite well and is reasonable powerful. So the complaints usually boil down to: It is ugly and verbose.
To me, verbose is a technical issue.

I mean, it's also a taste issue. The verboseness is ugly. I don't like it.

But it's a technical issue. You have to parse all of that verbosity, every time you read it, which is inefficient. If you're hand-generating it, which happens in the development process, you have to get all of that verbosity right, or it doesn't work. These days nobody hand-rolls a parser, but the interface to the parser is more clumsy than it needs to be, because it mirrors the structure of XML.