@property - take it behind the woodshed and shoot it?
Dicebot
m.strashun at gmail.com
Mon Jan 28 09:11:35 PST 2013
On Monday, 28 January 2013 at 16:59:40 UTC, Andrei Alexandrescu
wrote:
>
> Wait, so you're against any writable properties? Maybe there's
> a confusion somewhere.
>
> Andrei
Ah, yes, there is a confusion between "side-effect" from the pure
function point of view and "side-effect" from property
functionality point of view. I'd say that property setter should
be a pure function with one exception : it is allowed to changed
"this" fields. No global state changes, no calls to impure global
functions, not even calls to "this" non-property functions.
More information about the Digitalmars-d
mailing list