new DIP5: Properties 2

Rainer Deyke rainerd at eldwood.com
Mon Jul 27 11:42:58 PDT 2009


Kagamin wrote:
> If dip5 is as bad as opGet_foo is I'll delete it right now.

What's wrong with opGet_foo?  I like it better than any of the proposed
new syntaxes for properties:
  - It keeps the language simple by not adding more syntactic clutter.
  - In the (very common) case of calculated read-only properties,
opGet_foo means less typing.
  - With opGet_foo, the semantics of overriding properties in subclasses
are obvious.  You can override just the getter, just the setter, or even
just one setter of many.  You might also be able to do this with a
dedicated syntax, but it's a lot less obvious.


-- 
Rainer Deyke - rainerd at eldwood.com



More information about the Digitalmars-d mailing list