Generics parameter syntax
Generics parameter syntax
Posted Jul 6, 2020 20:38 UTC (Mon) by dezgeg (subscriber, #92243)In reply to: Generics parameter syntax by dtlin
Parent article: Generics for Go
Haskell was just an example of some other language where caseness of a name matters (but apparently even Go already uses it in other manner). I was thinking about having names starting with Uppercase always refer to types and names starting lowercase be variables. Thus in the v := F<T> example the caseness of F would tell whether the < is the less than operator or the opening bracket of a type parameter.
Posted Jul 7, 2020 12:19 UTC (Tue)
by dtlin (subscriber, #36537)
[Link]
It helps for that case, but if you have higher-order kinds, f<t> is also a type, for some appropriate type variables f and t.
Generics parameter syntax
