Why don't other programming languages have ranges?

bearophile bearophileHUGS at lycos.com
Sun Jul 25 14:54:30 PDT 2010


Andrei Alexandrescu:
> In my humble opinion, the design of Java, C#, and Go is proof 
> that their authors didn't get the STL. Otherwise, those languages would 
> be very different.

I don't believe you. Among the designers of Java, C# and Go there are people that are both experts and smart. C# designers have shown to be sometimes smarter than D designers. So I think some of them 'get the STL' and understand its advantages, but despite this in the universe they have found some other reasons to refuse it. I think they were unwilling to pay the large price in language complexity, bug-prone-ness, code bloat and compilation speed that C++ and D are willing to pay.

Here you can find why C# designers have refused C++-style templates & STL and chosen the generics instead:
http://msdn.microsoft.com/it-it/magazine/cc163683%28en-us%29.aspx
One important problem of C# generics can be solved adding IArithmetic<T>:
http://www.osnews.com/story/7930

I like D templates and I agree that adding them to D1 was a good idea (mostly because D1 is designed to be similar to C++) but you must accept that some language designers can understand STL and still refuse to add all the features necessary to implement it.

Maybe there is a way to build something like STL without C++/D-style templates :-)

Bye,
bearophile


More information about the Digitalmars-d mailing list