4 ms·
XML did everything and it's perfectly readable if it's formatted and structured well. This zoo of different markup/object/whatever languages we have to deal wit
by jimmaswell 4y ago
XML did everything and it's perfectly readable if it's formatted and structured well. This zoo of different markup/object/whatever languages we have to deal with now is largely a mistake.
- bogwog 4y agoXML is too much of a pain to write by hand.
- wombatpm 4y agoXML is like violence. If it’s not solving your problem, you need to use more
- berniedurfee 4y agoIt’s not that bad really. About the same as HTML, yet more difficult to mess up. Has comments, unlike JSON. More difficult to mess up than YAML.
- tetraca 4y agoXML is pretty tolerable with a slightly more sophisticated editor that supports completion. The things that make YAML awful never get any better.
- jimmaswell 4y agoThrow in copilot to anticipate all the boilerplate and repetition for you and it's downright pleasant.
- wyuenho 4y agoXML is a mistake. 80% of every XML document is just redundant noise because the IBM lawyer who invented the SGML syntax had never heard of S-expression.
- sam_lowry_ 4y agoSGML is way shorter than XML. But as complex as YAML to understand
- jimmaswell 4y agoThe "redundant" noise makes it more human-readable in my opinion. If you're in the weeds of a big XML document that's larger than your viewport, being able to see that you're at the end of a </Address> helps you keep your place, as opposed to something like JSON which I find much easier to get lost in. Even if it's not that big I appreciate the extra rails on the XML making it easier to keep my place.
- wyuenho 4y agoI consider this a fallacy. The condition you are given is not a common occurence. In the event they do occur, the solution can be found in your editor or viewer. It does not make sense to inject spurious junk into what is designed as a data interchange format, in which includes network information interchange. There's probably a name for this kind of fallacy that exaggerate the effect of a problem and the resulting contortions that were engineered around it.
- int_19h 4y agoWriting documents with S-exprs will get very tedious once you have to deal with stuff like whitespace and such that will inevitably show up when you're dealing with text documents. SGML is specifically optimized for those use cases, which is why it is so much more awkward to use when all you want is serializing some random structured data.
- gnulinux 4y agoThis is confusing because XML is the archetype of what I would consider unreadable. If I got a prompt in a programming language design workshop to intentionally design something unreadable for humans, I would start thinking about XML and see where it leads me. Can you name any language any more unreadable than XML to help me?
- jimmaswell 4y agohttps://www.mssqltips.com/tipimages2/2899_img5.jpg https://www.mssqltips.com/tipimages2/2899_img5.jpg I look at this and I see a visually-well-organized hierarchy of objects with properties and children. It's a sideways tree diagram. I honestly don't get what's supposed to be unappealing about it. > Can you name any language any more unreadable than XML to help me? Most of the other markup languages depending on the usecase. The "redundant" tags everywhere like </Address> in XML are very helpful if you're in the weeds of a big document that's taller than your viewport - you still know exactly what you're looking at and where in the hierarchy you are, as opposed to JSON or YAML which I find much easier to get lost in. Anyone can pick up a (properly-named) XML document and tell what it means at a glance, but JSON is easily a mystery unless you know the implicit schema beforehand. Maybe there's some minor friction to get past looking at XML because it's a little visually busy before you learn how to parse it out? Is that all there is to it?
- lifehasleft 4y agoI understand where you’re coming from because it’s true XML is going to perform the functions required without all the problems implicit with YAML’s “readable” syntax… But I have worked with some very complex XML and I feel you’ve chosen a simpler to read example. I have seen very complicated XML from Microsoft’s own configurations that is so large, long, and complicated that it is very hard to follow