"Parametric Polymorphism Everywhere"
Andrew Kennedy
Microsoft Research, Cambridge
Parametric polymorphism is thirty years old, yet until recently the only
mainstream programming language featuring it was C++. Now the feature -
renamed "generics" - is supported by Java, C# and even Visual Basic.
For the last five years I have been involved in the design,
implementation, and specification of generics in the .NET Common
Language Runtime, the virtual machine that underpins C# and Visual
Basic. In this talk I will compare the Java and C# generics designs,
commenting in particular on the impact of building generics into the
runtime system. I will describe novel and challenging aspects of the
implementation, including just-in-time specialization, sharing of code
at multiple instantiations, support for run-time types, and
pre-compilation. I will also discuss possible future directions for
generics.