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

Should a suffix tag always have a value? #42

Open
gibson042 opened this issue Mar 6, 2021 · 2 comments
Open

Should a suffix tag always have a value? #42

gibson042 opened this issue Mar 6, 2021 · 2 comments

Comments

@gibson042
Copy link
Contributor

The current grammar prohibits strings like "2021-03-06T16:05:42Z[x-foo]", in which a suffix tag has no value. Should they be allowed?

namespace      = 1*alphanum
namespace-key  = 1*alphanum
suffix-key     = namespace ["-" namespace-key]

suffix-value   = 1*alphanum
suffix-values  = suffix-value *("-" suffix-value)
suffix-tag     = "[" suffix-key "=" suffix-values "]"
suffix         = [timezone] *suffix-tag
@gibson042
Copy link
Contributor Author

And in a similar vein, should syntax be reserved for accommodating suffix tags whose key and/or value are not limited to alphanumeric ASCII characters? For example, any implementation written against the current text will forever reject strings like "2021-03-06T16:05:42Z[private-example-astral\x20content=\U0001D306]", even though a future version may desire such flexibility.

It might be prudent to structure a grammar in such a way that parsing remains possible and unambiguous, even though there are no currently-defined semantics beyond a requirement to ignore all suffix tags containing unknown content—but on the other hand, that might also be deemed unnecessary complexity. Either way, though, it's worth documenting the rationale for why such a possibility is either intentionally reserved or intentionally precluded.

@ryzokuken
Copy link
Owner

ryzokuken commented Mar 8, 2021

We considered both and decided it was not necessary to include them. I will try to write a longer explanation soon.

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

2 participants