4 ms·
XML is perfect for everything in theory. Too bad the average programmer apparently has such an issue grokking a little complexity, adjusting their eyes to the s
by jimmaswell 3y ago
XML is perfect for everything in theory. Too bad the average programmer apparently has such an issue grokking a little complexity, adjusting their eyes to the sight of brackets, and configuring their parser correctly that we all had to throw our hands up and use dumbed down formats instead.
- nemo 3y agoOne of my big drivers away from XML is that processing used to be insanely expensive. Over the years this has improved some, but XML parsing is still significantly less performant than any other option, especially compared to JSON or YML. Used to be a few orders of magnitude more expensive on compute to read, and that's why many folks in the industry were happy to move on, esp for cases like message passing. I've pulled XML out of a few apps over the years in apps with a lot of message passing and the throughput and performance improvements were measurable and significant. For that use case Protobufs are much better than XML and have a schema though it's a binary format, so not usable for conf files.
- xyzzy_plugh 3y ago> For that use case Protobufs are much better than XML and have a schema though it's a binary format, so not usable for conf files. There's a canonical JSON representation that is widely supported: https://protobuf.dev/programming-guides/proto3/#json https://protobuf.dev/programming-guides/proto3/#json Since JSON is a subset of YAML, you can also make YAML work. There is also a text format which lies somewhere between YAML and JSON: https://protobuf.dev/reference/protobuf/textformat-spec/ https://protobuf.dev/reference/protobuf/textformat-spec/
- nemo 3y agoYes, that's very true. I actually have used json representation at previous gigs, I just wasn't up to adding the extra qualifiers. Whenever I've needed to use Protobufs, I've always found them very nice work, really. I certainly have a much warmer opinion of them than XML.
- airstrike 3y ago> in theory
- xigoi 3y ago> adjusting their eyes to the sight of brackets XML's “brackets” aren't actually brackets, but less-than and greater-than signs.
- jimmaswell 3y agoalso known as angle brackets.
- xigoi 3y agoActual angle brackets look like this: 〈〉 A bracket should visually surround the text it's containing, otherwise it looks confusing. The less-than and greater-than signs are only used due to ASCII limitations, though I'm wondering why they didn't go for square brackets, which are available in ASCII.