DIP23 draft: Fixing properties redux
Steven Schveighoffer
schveiguy at yahoo.com
Tue Feb 5 08:47:33 PST 2013
On Mon, 04 Feb 2013 17:23:25 -0500, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> wrote:
> On 2/4/13 11:01 AM, Steven Schveighoffer wrote:
>> @property int foo();
>>
>> auto x = &foo; // error
>> int delegate() x = &foo; // ok
>
> That's an interesting idea. I'm a bit weary about it though. At least
> for properties I'm inclined toward starting real tight with address-of
> disabled and relax the rules later.
Did you mean wary?
In any case, that certainly is a defensible plan. We do have the
workaround of declaring an extra delegate (and someone probably can come
up with some template magic which does it). If we make it illegal, it
gives us the option of coming up with a good solution later if needed.
-Steve
More information about the Digitalmars-d
mailing list