@property - take it behind the woodshed and shoot it?
kenji hara
k.hara.pg at gmail.com
Thu Jan 24 21:35:08 PST 2013
2013/1/25 deadalnix <deadalnix at gmail.com>
>
> @function seems like an extra complication. Ambiguity between setter and
> getter for @properties when UFCS come into play are not solved. Functional
> style is impaired as you can't pass regular function around, just @function
> . You'll still find trap in generic code around the behavior of regular
> functions.
>
That's a good point. We need to solve another ambiguity about top-level
@property function which have a parameter, between top-level property
setter and UFCS property getter.
module abc;
@property int foo(int n);
void main() {
foo = 1; // top-level property setter
1.foo; // property getter with UFCS
}
We cannot distinguish the two usages without adding any new features.
Kenji Hara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130125/49efacc8/attachment.html>
More information about the Digitalmars-d
mailing list