4 ms·
Nice comparison. I'm of a different opinion on the schema language point: XML is readily usable with standard libraries, whereas any "custom" language is unlik
by jzwinck 12y ago
Nice comparison. I'm of a different opinion on the schema language point: XML is readily usable with standard libraries, whereas any "custom" language is unlikely to be. This matters when users want to implement their own tooling that understands the schema directly.
Three years ago I built a similar no-serialization message system, and while people initially objected to XML as the schema language, it was the right choice (even vs. JSON, which some wanted but would have been worse, e.g. no comments).
XML has been overused, but I think it's also highly appropriate for a schema language.
- kentonv 12y agoNote that all four systems compared have the ability to compile schemas into self-hosted structures. E.g. Cap'n Proto has schema.capnp which defines a Cap'n Proto structure representing a Cap'n Proto schema. Code generator plugins actually take this structure as input, and the parser is available as a library as well. So you can actually write tools that programmatically read and manipulate these schemas pretty easily. It's certainly a matter of opinion, but I find XML- and JSON-based schema languages extremely difficult to read with all the boilerplate they end up having.
- ahupp 12y agoThe issue with XML-based schema languages is that they optimize for making the language designer's life easier at the expensive of its users. For anything with significant usage this is not a great tradeoff.