On Thursday, 24 January 2013 at 20:00:18 UTC, Andrei Alexandrescu wrote:
On 1/24/13 1:35 PM, mist wrote:
You see, contrary to UFCS chaining this is not habit or syntax issue. It is semantic one - I am loosing an ability to distinct data access from
function call by simply looking at code.

This is the case with any property implementation.

Andrei

Not really. Good property usage is somewhat similar to unsafe cast usage - you say to others "Yes, I know what I am doing, please do not pay attention that this data is in fact function". The very point of properties is to be used almost indistinguishable from data and if this usage pattern fails - property author has lied and this is not really a property.

And because of issues like "+=" it is rather difficult (if possible) to define good properties in D now.

Reply via email to