Why don't other programming languages have ranges?

dsimcha dsimcha at yahoo.com
Sun Jul 25 11:19:03 PDT 2010


== Quote from Don (nospam at nospam.com)'s article
> levenshtein wrote:
> > Peter Alexander Wrote:
> >
> >> On 25/07/10 12:11 PM, levenshtein wrote:
> >>> Walter Bright Wrote:
> >>>
> >>>> Justin Johansson wrote:
> >>>>> It sounds like the D PL has invented the range idiom unlike any other PL.
> >>>> Pointer programming is deeply embedded into the C++ culture, and iterators
segue
> >>>> nicely into that culture. For D, however, programming revolves around arrays,
> >>>> and ranges fit naturally into that.
> >>>>
> >>>> It'll take years, but I'll be very surprised if ranges don't filter into many
> >>>> major languages, as well as other ideas that D has proven to be solid.
> >>> At least the C++ fellows already stole your 'auto' type inference and the
new template functionality. C# stole your delegate system. They even use the same
terms. The world dominance already started.
> >> Not to belittle D, but type inference was around long before D came on
> >> the scene, and I don't think they got the use of the auto keyword from D
> >> (auto was already an (essentially unused) keyword in C++).
> >
> > Type inference might have been around, but I believe it was A. Alexandrescu's
influence that made C++0x adopt the same 'auto' keyword for type inference. You
can see here:
> >
> > http://en.wikipedia.org/wiki/C++0x#Type_inference
> >
> > It's essentially copied from D. Seems funny, but the mighty C++ committee is
actually listening to us.
> C++0x announced that it was going to use the 'auto' keyword, so D copied
> it from C++0x. But D implemented it before C++ did. <g>.

This is my general impression of D as a language.  It's not a very innovative
language in the sense that everything in it has been done somewhere, in some
context, and it breaks no completely new ground.  However, its contribution to the
programming world is extremely important nonetheless in that it takes the best
features from lots of different languages, including some researchy languages that
almost noone uses in production, makes them work (more or less) well together and
makes them all usable from one **practical, production-oriented** language.

Basically, my take as a practical programmer rather than a theoretical comp-sci
researcher is "Who cares if it's been done before if it's not implemented in any
practical language?".


More information about the Digitalmars-d mailing list