Generics of a higher kind

A Moors, F Piessens, M Odersky - … of the 23rd ACM SIGPLAN conference …, 2008 - dl.acm.org
Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented …, 2008dl.acm.org
With Java 5 and C# 2.0, first-order parametric polymorphism was introduced in mainstream
object-oriented programming languages under the name of generics. Although the first-
order variant of generics is very useful, it also imposes some restrictions: it is possible to
abstract over a type, but the resulting type constructor cannot be abstracted over. This can
lead to code duplication. We removed this restriction in Scala, by allowing type constructors
as type parameters and abstract type members. This paper presents the design and …
With Java 5 and C# 2.0, first-order parametric polymorphism was introduced in mainstream object-oriented programming languages under the name of generics. Although the first-order variant of generics is very useful, it also imposes some restrictions: it is possible to abstract over a type, but the resulting type constructor cannot be abstracted over. This can lead to code duplication. We removed this restriction in Scala, by allowing type constructors as type parameters and abstract type members. This paper presents the design and implementation of the resulting type constructor polymorphism. Furthermore, we study how this feature interacts with existing object-oriented constructs, and show how it makes the language more expressive.
ACM Digital Library