Re:NestedText, a nice alternative to JSON, YAML, TOML
by xixixao on Saturday October 03, 2020 @09:05PM
(#24675879)
Both Objects and Maps in JS are in stable insertion order.
Re:NestedText, a nice alternative to JSON, YAML, TOML
by jeremy8883 on Saturday October 03, 2020 @11:34PM
(#24676355)
Apologies, it looks like pre es6, they were unordered objects. But now there are rules that guarantee insertion order.
They mention that their key/value pairs are ordered. The downside here is that not all languages (eg. javascript), support them.
I also prefer them to be unordered. The downside with ordered dictionaries, is that you need to always be asking "does sequence matter here?". So it adds an additional thing to think about, more tests need to be written, and certain optimisations can't always be made.