Why I chose D over Ada and Eiffel

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Wed Aug 21 05:39:34 PDT 2013


On 20/08/13 22:43, Andrei Alexandrescu wrote:
> It's a common omission to equate D's ranges with pipes/filters. That misses the
> range categorization, which is inspired from C++ iterators.
>
> A relatively accurate characterization of D ranges is a unification of C++
> iterators with pipes/filters.

I'm not sure I quite follow this point.  The Clojure sequence API has all the 
stuff you'd expect from the range interface -- empty?, first (front), next 
(popFront), nnext (popFrontN), last (back), drop-last (popBack), ...

Is the point here that in Clojure these are all implemented as pipes/filters on 
top of singly-linked lists, whereas in D range interfaces are a "first-class" 
part of the language that is agnostic about the underlying data structures?


More information about the Digitalmars-d mailing list