Skip to content
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

Maps: are keys reliably unique? #36

Open
mgravell opened this issue Feb 13, 2020 · 1 comment
Open

Maps: are keys reliably unique? #36

mgravell opened this issue Feb 13, 2020 · 1 comment

Comments

@mgravell
Copy link
Contributor

The specification indicates that they should be treated as a dictionary / hash structure, but it isn't clear what should happen if duplicate keys are encountered. The specific scenarios are shared with #35

and could be re-stated:

How is the following to be interpreted?

%2<CR><LF>
    +ttl<CR><LF>
    :3600<CR><LF>
    +ttl<CR><LF>
    :9001<CR><LF>
:3<CR><LF>

is this:

  • illegal
  • valid, last value wins (so: ttl = 9001)
  • valid, all values should be preserved (so: ttl = [3600, 9001] in some way)
  • something else?
@mgravell
Copy link
Contributor Author

mgravell commented Apr 9, 2020

additional thought on equality: which (if any) of the following are considered "equal" for this purpose?

  • +1\r\n
  • -1\r\n
  • :1\r\n
  • ,1\r\n
  • (1\r\n
  • =1\r\n1\r\n
  • $1\r\n1\r\n
  • !1\r\n1\r\n
  • $?\r\n;1\r\n1\r\n;0\r\n

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant