4 ms·
Eiffel is the first language I know of to use [] for generics. It's consistent with the interpretation of [] as "subscripting"; the generic is a family paramete
by edflsafoiewq 5y ago
Eiffel is the first language I know of to use [] for generics. It's consistent with the interpretation of [] as "subscripting"; the generic is a family parameterized by types, and the subscript selects one element of the family.
- thewakalix 5y agoWhat’s even more consistent is using juxtaposition to represent all parameterization, on the value and type levels. Haskell does this!
- edflsafoiewq 5y agoThat errs to the side of too much consistency for me. I'd like a nice balance; a small amount of syntax... but not too small. After all, morally x.a, x[a], and x(a) are all the same thing.