@property - take it behind the woodshed and shoot it?
Rob T
alanb at ucora.com
Fri Jan 25 13:45:06 PST 2013
On Friday, 25 January 2013 at 21:20:33 UTC, Andrei Alexandrescu
wrote:
> On 1/25/13 3:18 PM, Rob T wrote:
>> On Friday, 25 January 2013 at 20:10:01 UTC, Nick Sabalausky
>> wrote:
>>> What really got me upset about it was that here we have one
>>> of my
>>> favorite modern language features, properties, and then all
>>> of a sudden
>>> *both* the top #1 and #2 people behind D start trying to gut
>>> it if not
>>> outright remove it from the language entirely, instead of
>>> enacting, or
>>> at least promising to *eventually* enact, the long overdue
>>> fixes I've
>>> been anxiously awaiting.
>>
>> If I correctly understand Walters proposal and Andrei's view
>> point,
>> neither are proposing to fully axe property-like behavior. I
>> stand to be
>> corrected, but they both seem to think that enforcement through
>> @property is not required, and that's the main point being put
>> on the
>> chopping block.
>>
>> Walter and Andrei may want to clarify since I cannot speak for
>> them.
>
> That's right with the amendment that we're looking for a
> solution, not pushing one. Even the title of the thread is a
> question.
>
> Clearly properties are good to have. In an ideal world we
> wouldn't need a keyword for them and we'd have some simple
> rules for determining property status (especially when it comes
> to writes). If syntactic help is necessary, so be it. We want
> to make the language better, not worse.
>
>
> Andrei
OK, understood. I started a discussion in wiki showing how
property-like behaviour without full variable emulation can work
unambiguously for a few of the edge cases, such as reference
returns and taking the addresses, eg, &prop.
http://wiki.dlang.org/Talk:Property_Discussion_Wrap-up#ref_returns_and_taking_the_address
If we try and fully emulate variables, a ton of complexity starts
to creep in. If we do not fully emulate variables, then it
significantly weakens the arguments in favor of using @property
as a means to emulate variable.
--rt
More information about the Digitalmars-d
mailing list