Rust switches to external iteration

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Jul 4 06:38:06 PDT 2013


On 7/4/13 12:20 AM, Russel Winder wrote:
> On Wed, 2013-07-03 at 22:04 -0700, Andrei Alexandrescu wrote:
>> Evidence we've done the right thing by emphasizing ranges instead of
>> opApply.
>>
>> http://www.reddit.com/r/programming/comments/1hl2qr/rust_07_released/
>> https://mail.mozilla.org/pipermail/rust-dev/2013-June/004599.html
>
> I am not sure you can make that deduction. The question of internal vs.
> external iterators is not black and white.

One might have said I thought so if I wrote e.g. "completely eliminated 
opApply in favor of ranges". D is a multi-paradigm language. That being 
said, there is value in Occam reduction of the core/preferred 
abstractions to be used throughout. D put its bet on ranges (i.e. 
external iteration), not opApply (internal iteration).

> Native still seems to be in the 1990s OO vs. functional war: internal OR
> external. cf. C++, Go, D, Rust, Haskell, OCaml, F#, etc.

I think this characterization is a tad unfair to D. We clearly and 
deliberately espouse interoperation of paradigms: the const/immutable 
qualifiers bridge mutability with immutability, safe/system/trusted 
allow interoperation of system and safe code, opApply complements 
ranges. At each step we foster seamless integration of major paradigms, 
not forcing a choice between them.

> But I get too serious and philosophical. It is perhaps because I have
> just finished a two day workshop guiding people to consider these
> questions in a very practical way so as to improve their software
> development.

Those can be real fun.


Andrei


More information about the Digitalmars-d mailing list