Thursday, August 25, 2016

.NET/C# Generics History

Don Syme (via Doug Gregor):

Generics for .NET and C# in their current form almost didn’t happen: it was a very close call, and the feature almost didn’t make the cut for Whidbey (Visual Studio 2005). Features such as running CLR code on the database were given higher priority.

It was only through the total dedication of Microsoft Research, Cambridge during 1998-2004, to doing a complete, high quality implementation in both the CLR (including NGEN, debugging, JIT, AppDomains, concurrent loading and many other aspects), and the C# compiler, that the project proceeded. Product group resourcing for the feature was low until 2004, and remained sparse, leading to major overload on MSR Cambridge employees, though ultimately the code, designs and specifications were fully transferred into both the CLR and C#. Today, the future of the CLR is firmly in the hands of those in Redmond.

[…]

What would the cost of inaction have been? What would the cost of failure have been? No generics in C# 2.0? No LINQ in C# 3.0? No TPL in C# 4.0? No Async in C# 5.0? No F#? Ultimately, an erasure model of generics would have been adopted, as for Java, since the CLR team would never have pursued a in-the-VM generics design without external help.

Comments RSS · Twitter

Leave a Comment