property / getProperty() / setProperty()

bearophile bearophileHUGS at lycos.com
Sat Aug 1 09:15:02 PDT 2009


Andrei Alexandrescu:
> Thanks. So it looks like get_property() and set_property() could fly. 
> How does that sound?

Not too much good. Among the simpler solutions there's the 'property' attribute, that while not helping in reducing code (it makes code longer!) solves most problems, while being simple. It's the minimal solution that I think will work/fly.

There are also other alternative (and a little more complex) solutions (inspired by C# too), that allow to reduce boilerplate code. I have asked for one of them more than one year ago. They aren't hard to learn.

Bye,
bearophile



More information about the Digitalmars-d mailing list