2 ms·
Since you both seem to know the spec: how would you encode key/value pairs? Or would you have to have a list of nested lists, like (my_dict (key value) (k
by Groxx 9y ago
Since you both seem to know the spec: how would you encode key/value pairs? Or would you have to have a list of nested lists, like
(my_dict (key value) (key value) (key value))
Un-ordered qualities for data can be useful (e.g. they allow you to reorder data to stream "important" stuff first), but I don't see it anywhere in here.
- zeveb 9y agoWith canonical S-expressions, unordered sets are a problem because part of the point is to be able to have a single canonical sequence of bytes, which can be hashed or compared bytewise for equality. In general, I'd resist specifying data as arbitrary key-value pairs, but if I decided that I indeed needed them, I'd do exactly as you suggest — and I'd mandate that the be sorted lexicographically by their keys.