DIP 36: Rvalue References

Dicebot m.strashun at gmail.com
Tue Apr 23 01:13:48 PDT 2013


On Sunday, 21 April 2013 at 16:08:55 UTC, Zach the Mystic wrote:
> The only thing I could think of was if you want to 'ref' a 
> reference type.
>
> void func(ref Object o, scope Object o2, scope ref Object o3) {}
>
> Would there be a difference between the type of o and o2, or of 
> o2 and o3? There is inconsistency, but it would be nice to find 
> use cases which make this inconsistency truly unworkable with 
> other things in the language.

Taking consistent approach with "ref", they all should have same 
type but bpth "ref" and "scope" differences are mangled into func 
name so that caller can take notion of proper behavior. I don't 
see an issue here.


More information about the Digitalmars-d mailing list