2 ms·
> a compromise would perhaps be to allow at least reified primitive generics so that List<int> would be a proper runtime type whereas List<Object> would be the
by jdmichal 12y ago
> a compromise would perhaps be to allow at least reified primitive generics so that List<int> would be a proper runtime type whereas List<Object> would be the runtime version of all reference types in List<T>.
This is actually pretty much exactly what the .NET runtime does. All value types get a separately-JIT'd version of the type, while all reference types share the same Object-based version. See section on implementation here:
http://msdn.microsoft.com/en-us/library/ms379564(v=vs.80).aspx#csharp_generics_topic2 http://msdn.microsoft.com/en-us/library/ms379564(v=vs.80).as...