carbon-lang
carbon-lang copied to clipboard
Repeated 'fnty' in curried function types
According to the grammar in the basic syntax proposal (#162) it seems like curried function types require repeating the fnty keyword:
expression: "fnty" tuple return_type
return_type: "->" expression
For example:
fnty (Int) -> Int // OK
fnty (Int) -> fnty (Int) -> Int // repeated fnty
fnty (Int) -> (Int) -> Int // desired
I understand why it happens, and I see that it is uniform with regards to the expression production, but the result -- repeated fnty keywords -- does not seem aesthetically pleasing to me.
Note, "Should there be a function type? #191" may supersede this issue.
This issue with repeated fnty a good observation. Certainly a disadvantage of the current syntax.
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please comment or remove the inactive label. The long term label can also be added for issues which are expected to take time.
This issue is labeled inactive because the last activity was over 90 days ago.