On Sun, Feb 3, 2019 at 7:22 AM Konrad Hinsen <googlegro...@khinsen.fastmail.net> wrote: > > David Storrs <david.sto...@gmail.com> writes: > > > What projects have y'all done where XML was the best choice for a > > reason other than "because we needed to interoperate with a service > > that required XML"? > > This: > > https://mosaic-data-model.github.io/
That looks very cool, and like something that I'd like to talk to you about professionally. Would you mind if I contact you off-list? > > and this: > > https://github.com/khinsen/leibniz/ Wow. That's impressive, and seems like something that could have a real impact. Kudos. > In both cases, the motivation was to facilitate access to the data for > as many software developers as possible. There are good XML support > libraries for most programming languages, even Fortran. True, but most languages also have good JSON tools, YAML tools, etc. > The other candidates in such circumstances are JSON and YAML, but you > get a lot more structure for free with XML than with JSON, while > avoiding the enormous complexity of YAML. I also found some utility in > schemas and schema-based validation tools, although that universe looks > heavily overengineered to me. Still, it's work done by others that I > don't have to repeat myself. "Overengineered" is a good way to put it -- I think that's what bothers me about XML. I do grant its utility, I'm simply not convinced that most of it is necessary for most cases. > > On the other hand, XML is extremely heavyweight, thereby slowing > > parsing and transmission as well as making the data less > > human-readable. > > Compared to what? Special-purpose data format? Design your own language, > write you own parsers, working at the character level? I don't write > software in assembly for good reasons, and for the same reasons I want > higher-level data formats than just character streams. I was specifically thinking of JSON. It allows for encoding all the essential structure of XML in far fewer characters, meaning there's less data to send over the wire. It's more human-readable. There are good parsers in all languages, and the output of the parser is a straightforward datatype. In most cases it parses faster than XML. (Given parsing libraries in the same language, in most cases, benchmarks lie, etc.) XML definitely has useful features that JSON lacks, and I can think of times when it would make sense -- as Neil pointed out, a good candidate would be medical data that needs to be readable 100 years from now. My question, however, was about how often those cases actually come up in practice, and what factors different people find compelling when evaluating XML vs a different interchange / storage format. > > Konrad. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.