Hacker News new | ask | show | jobs
by octocoupler 3985 days ago
How do your examples specify that T and U are generics?
1 comments

As I said, in Haskell "unquantified type variables are implicitly universally quantified" i.e. type variables (which are always lowercase in Haskell, to distinguish them from concrete types which are uppercase) are always generic.

So it's true that in the Swift examples, you would need a convention to distinguish type variables from concrete types, or else you need to explicitly mark them as generic.