DIP23 draft: Fixing properties redux
Steven Schveighoffer
schveiguy at yahoo.com
Tue Feb 5 13:45:03 PST 2013
On Tue, 05 Feb 2013 15:15:05 -0500, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> wrote:
> On 2/5/13 2:05 PM, Steven Schveighoffer wrote:
>>
>> I think a cast would be sufficient:
>>
>> cast(int *)(&refparam); // understood that a cast is required
>>
>> To jump through this machinery to turn a reference into a, um...
>> reference, seems like a huge waste of code space and resources.
>
> The whole point was to avoid using operator &.
The mechanism to avoid it seems overly extravagant (and prone to low
performance). If you want actually avoid using operator &, then make a
compiler special function or something.
Also, the use of & can still be hidden inside a function.
-Steve
More information about the Digitalmars-d
mailing list