carbon-lang icon indicating copy to clipboard operation
carbon-lang copied to clipboard

Repeated 'fnty' in curried function types

Open gribozavr opened this issue 5 years ago • 3 comments

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.

gribozavr avatar Nov 10 '20 17:11 gribozavr

Note, "Should there be a function type? #191" may supersede this issue.

jonmeow avatar Nov 10 '20 22:11 jonmeow

This issue with repeated fnty a good observation. Certainly a disadvantage of the current syntax.

jsiek avatar Feb 28 '21 12:02 jsiek

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.

github-actions[bot] avatar Jul 30 '21 01:07 github-actions[bot]