RFC: scope and borrowing

Kagamin via Digitalmars-d digitalmars-d at puremagic.com
Sun Sep 21 02:15:44 PDT 2014


On Monday, 25 August 2014 at 11:48:18 UTC, Marc Schütz wrote:
> It would be desired in `chooseStringAtRandom`, but not in the 
> `findSubstring`, whose returned string shouldn't be limited by 
> the scope of the needle. If it is made the default, there would 
> need to be a way to opt out, such as removing an owner.

If `in` will be defined as scope!callee, i.e. can't be returned, 
then it can be removed from the return type.


More information about the Digitalmars-d mailing list