On Fri, 04 Jun 2010 16:04:56 -0400, Andrei Alexandrescu <[email protected]> wrote:

On 06/04/2010 02:58 PM, Graham Fawcett wrote:
[snip]
Thanks for the response. Yes, it makes mode to favour performance for
the common case, and as you say it's not hard to resolve this issue.

Now, that being said, a nice addition would be to create a duper range
that allows you to do one expression:

foreach(char[] line; retro(array(duper(f.byLine()))))

Yes -- duper (and iduper) for the win! Great idea.

I wonder what we can do to automatically reject such programs.

Train people that being given a mutable buffer does not mean you own it? :)

Seriously though, it's just something you learn. I don't think there's anything the compiler can do to help.

-Steve

Reply via email to