On 12/9/2014 8:34 PM, Dicebot wrote:
But as far as I understand the spec it will result it this code failing too:

auto r = ["aaa", "bbb", "ccc"].map!foo;
// should compile but will fail because foo returns scope  ref:
string s = r.front;

What I mean is that in current proposal it is impossible to transfer scope
information down the call chain - either function always returns scope ref or
never. Which implies the necessity of something like `auto scope`...

If you want data to 'escape' from r.front, then it shouldn't be marked as scope. Definitely, using scope successfully will require some rethinking of how code is written.

Reply via email to