I'm back

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Nov 14 09:43:54 PST 2012


On 11/14/12 7:29 AM, H. S. Teoh wrote:
> But since this isn't going to be fixed properly, then the only solution
> left is to arbitrarily declare transient ranges as not ranges (even
> though the concept of ranges itself has no such implication, and many
> algorithms don't even need such assumptions), and move on. We will just
> have to put up with an inferior implementation of std.algorithm and
> duplicate code when one*does*  need to work with transient ranges. It is
> not a big loss anyway, since one can simply implement one's own library
> to deal with this issue properly.

What is your answer to my solution?

transient elements == input range && not forward range && element type 
has mutable indirections.

This is testable by any interested clients, covers a whole lot of 
ground, and has a good intuition behind it.


Andrei


More information about the Digitalmars-d mailing list