4 ms·
Question: Can s-expression list-of-lists really be used to represent an unordered map when it comes to operations like equality? Or rather, does one simply use
by akubera 10y ago
Question: Can s-expression list-of-lists really be used to represent an unordered map when it comes to operations like equality? Or rather, does one simply use expectations/context to compare this object to, say
[["foo", "bar"], ["baz", ["quuz", 1, true]]]
making it a non-issue?
- zeveb 10y ago> Question: Can s-expression list-of-lists really be used to represent an unordered map when it comes to operations like equality? With the right predicates, anything is possible grin I think that context unavoidable: one can't just read a JSON value into a generic data structure, or even into a typed structure: one has to apply the types of one's business logic (e.g. 'user-id' must not only be a string, but a string beginning with either 'E' or 'C'). In that context (pun intended), then it makes sense for equality comparisons to be at the business-object layer, not at the freshly-deserialised JSON object layer.