3 ms·
> 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, a
by 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.