Why don't other programming languages have ranges?

%u e at sp.am
Mon Jul 26 09:24:30 PDT 2010


> But then their containers and algorithms are markedly inferior to STL's.
> They are toxic to the programmers who have only been exposed to them. So
> Java and C# got STL and decided to not go with it, I'm sure they would
> have at least gotten a few good bits from it. But no - the entire e.g.
> Java container library is parallel to everything STL stands for.

If you are talking about the original System.Collection you are right. But
System.Collection.Generic (.NET 2.0) and LINQ (3.0) have come a long way since
then and C# has gained much of the expressiveness that D is just reaching with
std.range and std.algorithm.

In fact you can see many similarities:

.Where() => filter()
.Select() => map()
.Aggregate() => reduce()
.Take() => take()
...


More information about the Digitalmars-d mailing list