Possible @property compromise

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Jan 31 19:38:04 PST 2013


On 1/31/13 10:14 PM, Jonathan M Davis wrote:
> On Friday, February 01, 2013 01:01:02 Jesse Phillips wrote:
>> I think his suggestions need implemented regardless of what we do
>> with @property. I think Walter just felt this would appease the
>> pro-property.
>
> Well, it doesn't even come close. For the most part, the pro- at property folks
> want explicit proprties, and that's precisely what Walter is proposing that we
> get rid of.
>
>> writeln = "hi" would not compile with Walters suggested changes.
>
> Only because it's variadic. Something like
>
> range.popFrontN = 7;
>
> _would_ compile. And that's just as bad. We need explicit setter properties in
> order to avoid letting assignment work with functions where it makes no sense
> for it to work.

Under some proposals range.popFrontN = 7 would not compile because 
there's no corresponding range.popFrontN that yields an int.

Andrei



More information about the Digitalmars-d mailing list