Rust switches to external iteration
Adam D. Ruppe
destructionator at gmail.com
Thu Jul 4 05:15:23 PDT 2013
On Thursday, 4 July 2013 at 05:04:59 UTC, Andrei Alexandrescu
wrote:
> Evidence we've done the right thing by emphasizing ranges
> instead of opApply.
One downside is with opApply, you have a little more control over
escaping references. Suppose you take a range to view a
container, then .save it somewhere and keep that copy. Then when
the container dies, your range points at invalid memory.
The Rust people must have solved that though. Probably not so
hard there since their compiler has a borrow check, whereas in D
I was trying to do it with library hacks...
More information about the Digitalmars-d
mailing list