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

Repeated 'fnty' in curried function types

Open gribozavr opened this issue 4 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