Live data from Hacker News

The lost art of XML

marcosmagueta.com

161–170 of 179 posts

Re: The lost art of XML

#161
post #155
post #40

Earlier quoted context omitted.

XML grew from SGML (like HTML did), and it brought from it a bunch of things that are useless outside a markup language. Attributes were a bad idea. Entities were a so-so idea, which became unapologetically terrible when URLs and file references were allowed. CDATA was an interesting idea but an error-prone one, and likely it just did not belong. OTOH namespaces, XSD, XSLT were great, modulo the noisy tags. XSLT was…

> OTOH namespaces, XSD, XSLT were great I don't know, the few times I have had to XML, I went "This is not so bad, I don't know what all the fuss is about" until I hit namespaces. I don't know if I was just using an inferior library but namespaces sucked. The minute namespaces came into the picture all the joy left the project. And XSLT... I only ever did one thing with it "use the browser to turn demarc XML records…

CSS predates XML.

Re: The lost art of XML

#162
It's ironic that he mentioned "comments" while we live on the sad age where "comments are evil", "smells like bad code"; while the reality of people screaming these sentences are exactly those who deliver garbage code.

Re: The lost art of XML

#163
> JSON has no such mechanism built into the format. Yes, JSON Schema exists, but it is an afterthought, a third-party addition that never achieved universal adoption.

I don't see how this is in any way more of an afterthought than XML Schema was (except that it was designed by the same group as XML)

> Namespaces. XML allows you to compose documents from multiple schemas without collision.

It "allows" it in the extremely narrow sense that you can write a file with elements from different namespaces, parse it into a DOM with a schemaless parser and can still distinguish the elements.

It does not define any semantics about what an interaction between different namespaces means or which namespaces you can and which you can't combine.

Re: The lost art of XML

#164
post #157

Earlier quoted context omitted.

It is called DevUx and it is certainly a thing. If the tooling sucks and the entire ecosystem is hard to understand, people won't adopt a technology. XML was forced down everyone's throat for a decade! The second something else came along literally everyone who could jumped ship.

Interestingly, I've never heard the term 'DevUx' before. I suspect it's the same concept as Developer Experience, which I also find supremely important and historically underappreciated. Companies like JetBrains for example make a killing by being a company that really takes this aspect seriously. On the other hand I've had a fellow developer laugh at me when trying to explain how this is important, so I'm unsure thi…

Yeah devux is just short for developer experience.

The apple app store had an amazing initial devux, vs the blackberry app store which famously was a huge pain just to apply to and all the tooling was horrible.

Re: The lost art of XML

#165

Earlier quoted context omitted.

For most data that is structured in JSON now, you could have easily done the same in XML using a simple text editor. I agree with the author that XML is very similar to S expressions but with the brackets replaced by closing tags. Parsing XML wasn't complex either. There have been many good libraries for it in pretty much most languages

If only there was one good library. libxml2 is the leading one, and it has been beleaguered by problems internal and external. It has had ABI instability and been besieged by CVE reports. I agree it shouldn’t be hard. On the evidence, though, it is. I suspect the root problem is lack of tools. Lex and yacc tools for Unicode are relatively scarce. At least that’s what’s set me back from rolling my own.

What is wrong with xml-rs ?

Re: The lost art of XML

#166
I’ve once got a contract to write tiny system that had to integrate with 20-30y old system, then written in some version of c# / Microsoft framework, it was only speaking xml. I had problem with timestamp, cause depending on some internal state, it was returned different way. I had to go and read over 100pages of date+time in xml spec and implement it. Also, found that a lib they were using had bugs, so my lib had to deal with it.

I hate xml.

Re: The lost art of XML

#167

> This is insanity masquerading as pragmatism. > This is not engineering. This is fashion masquerading as technical judgment. The boring explanation is that AI wrote this. The more interesting theory is that folks are beginning to adopt the writing quirks of AI en masse.

I feel more like AI have adopted some preexisting disagreeable writing styles from the beginning and now we associate these with AI.

Yeah, this is why I have transitioned from "this seems like it was written with AI" to "this is full of clichés." Maybe it was only written by a human or maybe it was written entirely with AI or somewhere in between, but in any case, clichés make it tiresome to read.

Re: The lost art of XML

#168
Xml fundamentally does not communicate when information under a tag is a list or a map structure, a data structure indication that is critical for deserialization of information into a format usable by programs.

In addition, it has tons and tons and tons of cruft, specification bloat, dogma.

The best parts of XML were probably XPath, and some aspects of document validation.. and that's it

Re: The lost art of XML

#169
While XML was imperfect from overcomplication, JSON is imperfect by falling short of even basic database use, and somehow despite its alleged simplicity it manages to be unstandardized almost as badly as Markdown. JSON and YAML both fail to have comments that survive processing, something it's easy to regret since XML does have comments that appeared in the parsed objects.

A saner subset of XML, possibly run through some over-caffeinated developers to lighten its redundant syntactic feeling, would have given us something FAR better than JSON's failure and YAML's gratuitously hypercomplicated syntax.

Developers Are Stupid - developer.

Post reply on HN