@property - take it behind the woodshed and shoot it?
Jacob Carlborg
doob at me.com
Sun Jan 27 04:07:34 PST 2013
On 2013-01-27 12:20, Michael wrote:
> int CoolThing { in; out; } - auto property without implementation;
>
> int CoolThing { private in; out; } - private setter; public getter;
>
> int CoolThing
> {
> in
> {
> _privateCoolThing = @value * 42;
> }
>
> out
> {
> return 42;
> }
> }
>
> Explicit calling: void in_CoolThing(int); int out_CoolThing(); Proper
> "Property rewrite" can be implemented.
>
> Property CoolThing looks like code contract for _privateCoolThing. So
> it's maybe + or -.
>
> At all, it looks like C# style in D Way.
>
> --no-parenthesis for current behaviour for non-property functions.
Won't this conflict with contracts, which also uses the "in" and "out"
keywords?
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list