-
Notifications
You must be signed in to change notification settings - Fork 602
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
Which is the reasoning to make the tags
entry an array?
#611
Comments
Because they get serialized deterministically so they can be signed. The single-letter stuff is just a rule of thumb. Relays are free to index other tags if they want. Also there are more than enough letters. |
Fair enough, I didn't think about determinism. I think using more descriptive names is preferable, regardless of how many letters there are. But this is just a personal take, not a rule. |
It's for versioning or something like that. I can't think of a scenario in which the version would have to change, but who knows, it didn't cost anything to have the |
Do you think that it's useful to clarify that in the NIP-01? If there are other NIPs refering to serialized object also too. Maybe clarify a parameter called |
No, that's not a good thing. I don't want people to think there will be other versions, because there won't. Unless something really weird and unexpected happens, but it's not planned at all and it would be a catastrophe. |
Sure, no problem. Thank you for the explanation. Closing this now. I hope this issue serves for future reference. |
This comes into my mind when I try to understand which is the reasoning to define single letter tags.
Single letter tags present no context to the person reading it. It's not a problem for users but why not use something developers would instantly know what is refering to? Single letter tags also create the limitation of how many letter there are, which was discussed in issue 541.
Is it to save storage and bandwith since they can appear multiple times?
Appearing multiple times is a problem because the
tags
entry is defined as an array, or am I wrong?If it was a dictionary, the
tags
key would have it's keys that each one could hold arrays, saving the need for writing multipleX
tags. The way it is right now seems to create something likearrayctionary
, an array of arrays which tries to emulate the exact behaviour of a dictionary key holding an array: multiple entries in a single key.I know that this is already expected behaviour and there won't be any breaking changes but
can anyone elaborate on that so I can fully understand the reasoning?
The text was updated successfully, but these errors were encountered: