-
Notifications
You must be signed in to change notification settings - Fork 1
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
disambiguating parentheses are ambiguous #53
Comments
I assume the same applies to clauses?
could be parsed as Earlier we dropped the |
Yes, it is no longer obvious where one clause ends and another begins, without some disambiguation policy. I can live with
become
But indeed, that's an option. |
As I said on slack, allowing comma-separation doesn't bother me; requiring it does. The no-space-between-fun-and-open-paren plan excludes styles like
but perhaps we could allow a more spaced out presentation at the cost of being explicit
Kicking stuff around... |
I've implemented 7d66d15 as a holding pattern. |
I have now pushed a liberalization, allowing
and
but also their just-whitespace variants. My preference would be for whitespace in lists and commas between arg patterns in abstractions. But I'm ok with diversity. I didn't allow
instead of
but perhaps we should? |
One of the abiding design principles of our syntax is that the juxtaposition of two valid expressions is never a valid expression. That's how come we can write lists like
Except that I broke this principle horrendously by allowing parentheses for disambiguation.
is currently a one element list computed by iterated application.
With infix operators, that's bound to happen.
What does
mean?
The easiest fix is to change the principle to "no two valid expressions separated by whitespace ever constitute a valid expression", while insisting that application allows no whitespace between the function and the opening paren of its arguments. i.e.
is two things, but
is one.
But perhaps there are other ways out of this rat sack.
The text was updated successfully, but these errors were encountered: