2 ms·
Re-using standards is a great idea, and should remain people's default, but I don't see the benefit here. What's the advantage of re-using a format? Ecosystem
by jomohke 3y ago
Re-using standards is a great idea, and should remain people's default, but I don't see the benefit here.
What's the advantage of re-using a format?
Ecosystem? That won't help SQLite here, who don't have dependencies.
Keep in mind that anyone trying to write a parser for this is also writing a parser for the entire SQLite file format (the only way to access bytes). And it's a spec simple enough to fit on one monitor.
Design?
BSON (and others?) seem to have different goals.
SQLite's format seems to minimise conversion/parsing (eg. it has multiple TEXT types depending on how much escaping is needed; BSON has one fully-parsed UTF-8 string type). BSON is more complex: includes many types not supported by json (dates, regexs, uuids...) and has a bunch of deprecated features already.
SQLite's on disk-format is something they intend to support "forever", and as with the rest of SQLite, they enjoy pragmatic simplicity.