Why don't other programming languages have ranges?
Sean Kelly
sean at invisibleduck.org
Mon Jul 26 12:02:12 PDT 2010
Bruno Medeiros Wrote:
> On 26/07/2010 05:32, Sean Kelly wrote:
> >
> > C# generics are a heck of a lot nicer than Java generics, but there also I think there were other practical reasons for the decision that they didn't fully address. C# is effectively the native language for .NET, and so its libraries should be as useful as possible to other languages compiled to CLR bytecode. If C# used C++ style templates, C++ would integrate well with it, but no other languages really would. Try telling some Visual Basic programmer that they have to define a different container interface for each stored type and see if they use your library. The "Binary Compatibility" section mentions this, but only briefly.
> >
>
> Why is that? (my C# knowledge is very rusty) Is it because they maintain
> some runtime information unlike Java generics which are completely erased?
Yes. It's been a while since I looked at C# as well, but I think this is the crux of it.
More information about the Digitalmars-d
mailing list