ref for (const) variables

Namespace via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Mar 17 02:59:59 PDT 2015


On Tuesday, 17 March 2015 at 09:56:09 UTC, Jonathan M Davis wrote:
> On Monday, March 16, 2015 18:46:59 Namespace via 
> Digitalmars-d-learn wrote:
>> May this be worth of an enhancement request? Or was this 
>> already
>> rejected?
>> And, no, I want no mutable references such as C++.
>
> Walter has been adamantly against having ref variables like C++ 
> has. They're
> a potential @safety issue and add a fair bit of complication to 
> the
> language. I doubt that suggesting that we have them as 
> const-only would
> change his mind any - especially since that addresses none of 
> the @safety
> issues.
>
> - Jonathan M Davis

If I can't mutate them, where are the @safety issues?


More information about the Digitalmars-d-learn mailing list