Hello .NET, D Here Calling

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Dec 23 10:23:57 PST 2008

Lutger wrote:
> Daniel de Kok wrote:
>> With no intention to flame, but I never quite understood why people are
>> so keen on properties over getter/setter member functions. What
>> advantage does it have over obscuring direct member access and indirect
>> member access?
> This 'obscuring' is exactly what makes properties a bit more attractive. There are a lots of extra little niceties, but I forgot them all (after a two day course on .NET :) ).
> But, in the end, properties *are* getter/setter pairs.
>> I think that the D approach is good enough, since it does not add
>> complexity for library designers.
>> -- Daniel
> The D approach is a little more pleasant to write imho, but it's not good enough. You can't write 'foo.bar += n' if bar is a property in D and make that work. Imho, if you can't do that, it doesn't behave like a property, it isn't really a property.

We're trying to make that work. D is due for an operator overhaul.


More information about the Digitalmars-d mailing list