DIP23 draft: Fixing properties redux
ixid
nuaccount at gmail.com
Tue Feb 5 05:12:11 PST 2013
> And how often do you think you'll find yourself in the
> situation of needing to get a delegate from a property anyway?
> Can't we just make »@property getter expressions are always
> equivalent to their return value« a hard (simple!) rule and add
> something like __traits(propertyGetter, ...) for the rare cases
> where you really need to get hold of the underlying function?
As a beginner D user this seems like a far better solution, it's
much clearer and doesn't violate one's normal understanding of
parentheses (which is exactly as you've outlined). &(a.b) feels
very much like a hack.
More information about the Digitalmars-d
mailing list