From this question: What is a higher kinded type in Scala?, I understand what is higher-order types
(also first-order type
and proper type
).
But there is still a question: What's the relation between generics
and "higher-order types"?
I know Java supports generics
, which is like the first-order
type in Scala.
Which of the following are correct?
- In Scala, only the
first-order type
isgenerics
- In Scala,
first-order
andhigher-order
types are both belong togenerics
- In Java, the
generics
just meanfirst-order
type, it's not complete generics
is a common term means we can "abstract" on types, no matterfirst-order
orhigher-order