-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is map type unordered? #30
Comments
Just a nit pick:
Python 3 |
The theoretical datastructure 'hash' and 'dictionary' are unordered - of course some implementations do have orderings fall-out as a side-effect (insert order, usually). I think there should be no guarantee of order made by RESP3, as this would require Redis or any other implementer of RESP3 to always return the same ordering for a map and make implementing a client tricky in a language where the 'logical' native map type to return is not ordered (for example, Go maps, Python 2 dicts) - you would either depend on a non-standard library that provides an ordered map, or ditch the ordering and return your native unordered type. |
Spec suggests encoding json as an example and json is unordered, however it doesn't explicitly states this.
Ordered hash maps would complicate implementation for some languages, like go(map) or python(dict).
The text was updated successfully, but these errors were encountered: