-
-
Notifications
You must be signed in to change notification settings - Fork 36
Unify the arity of input, local, and match #527
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
Comments
Actually, with an Option D approach, we can do one better: Get rid of all curlies within code. So rather than the current:
We could have:
The key here is that |
I appreciate the intent, but in terms of readability, I don't actually find that
is better than
In particular when It's helpful to see where the expression actually is. It's also corresponds nicely with the placeholder syntax. |
Replying here to @aphillips from #526 (comment):
Just as an observation, given that whitespace isn't significant in the syntax, the above message would also be valid as
and, conversely, the current syntax with its multiple selectors per single match could be presented as
This is rather equivalent to reordering the arguments of a function, which I at least have not seen as a common problem irrespective of whether they are displayed on one or multiple lines. Is this a problem that you've commonly seen elsewhere? |
One approach here would be to make the N=1 and N>1 cases different for Then a common single-selector message could look like
while a message with two selectors would be
|
@eemeli suggested:
I'm not a fan of creating multiple ways to write messages. So I don't think this would work for me. If we want to indicate arity of One of my Seville "beer and tapas" syntaxes did that:
The question, I guess, would be: what user benefit derives from having syntax to explicitly close arity? The parser doesn't care. How will this help users? (I'm not saying, please note, that it won't)
The ability of folks to make poor assumptions based on no evidence can be breathtaking in my experience 🤦. The thing here is that we're not "proper code" and |
I think our syntax choices may have made this issue obsolete. @stasm, can I close this? |
I don't think we've actually resolved this. In #529, we're dropping |
I labeled this LDML45 but think we will likely close this. |
Right now,
input
andlocal
take a single expression, whilematch
takes more than one. This works because expressions are wrapped in{
/}
.Intuitively, I think it would be good to unify this. Either allow more than one expression in
input
andlocal
, or require each selector to be declared with its ownmatch
.The text was updated successfully, but these errors were encountered: