Smart references

Zach the Mystic via Digitalmars-d digitalmars-d at
Sun Mar 15 10:49:12 PDT 2015

On Saturday, 14 March 2015 at 15:55:51 UTC, Marc Sch├╝tz wrote:
>> Are the suggested changes also related to the possibility of 
>> making `ref` a type?
> Are there plans to do this? I remember Walter suggested `ref` 
> for non-parameters, i.e. local variables, but as a storage 
> class, not a type modifier.

I don't think there are plans per se, but if struct semantics are 
made powerful and flexible enough, I can imagine it being 
possible to simply recreate 'ref' parameters as 'Ref!' struct 
templates. For me, the question is what new additions would have 
to be added to structs to enable this. It seems like a good 
thought exercise, regardless of the final decision.

More information about the Digitalmars-d mailing list