ref for (const) variables

Jonathan M Davis via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Mar 17 02:55:59 PDT 2015


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



More information about the Digitalmars-d-learn mailing list