new DIP5: Properties 2

Rainer Deyke rainerd at eldwood.com
Fri Jul 31 22:07:25 PDT 2009


Ary Borenszweig wrote:
> But in the case of name vs. name() it's much simple: it's a really
> simple convention *that already exists in almost every other language*.
> Ok, people can choose not to follow it, just like naming functions with
> silly names, or not adopting naming conventions, but... why would they
> do that?

+1

It's pure convention that 'a = x.b' reads a property, 'x.b = a' writes a
property, and 'a + b' performs addition.  However, these are /useful/
conventions that aid understanding.  The 'a + b' case is apparently
useful enough to merit special language support, so why not the others?

And if properties somehow manage to solve the rvalue return problem, so
much the better.


-- 
Rainer Deyke - rainerd at eldwood.com



More information about the Digitalmars-d mailing list