RFC: scope and borrowing

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Sun Sep 21 01:25:28 PDT 2014


On 2014-09-21 05:38, Walter Bright wrote:

> 2. I think there is quite a bit of overlap between scope and ref.
> Essentially, ref does everything scope does, except deal with classes.
> I'm not terribly comfortable with such a large overlap, it implies
> something is wrong. I don't have an answer at the moment.

Am I missing something but isn't "ref" for passing something by 
reference instead of by value. "scope", in this proposal, is for dealing 
with lifetime? Or do you have any other proposal for what "ref" might 
become?

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list