Why don't other programming languages have ranges?

Don nospam at nospam.com
Sun Jul 25 12:45:48 PDT 2010


Andrei Alexandrescu wrote:
> On 07/24/2010 08:36 AM, Justin Johansson wrote:
>> It sounds like the D PL has invented the range idiom unlike any other PL.
>>
>> Since the dawn of PL's, which must be about 50 years now since Lisp
>> for example, it is hard to imagine a new PL inventing a completely
>> new idiom as "ranges" seem to purport. Given the many academic
>> arguments for ranges as opposed to iterators, why is it that the
>> D PL seems to be the major if not only sponsor of the range idiom?
>>
>> Is D really taking the lead here and is it likely that other PL's
>> will eventually take D's lead?
>>

> Third, ranges were "in the air" already at the time I formalized them. 
> Boost and Adobe had notions of "range", even though all their primitives 
> were to expose begin() and end(), so they were essentially lackeys of 
> the STL iterator abstraction. People were talking about "range" whenever 
> they discussed two iterators delimiting a portion of a container. It was 
> only a matter of time until someone said, hey, let's make range a 
> first-class abstraction.

It's also worth noting that one of the primary advocates of ranges in 
C++ was Matthew Wilson, who was hugely influential in the early years of 
D. Even the limited ranges that exist in Boost, are somewhat influenced 
by D.


More information about the Digitalmars-d mailing list