@property - take it behind the woodshed and shoot it?

Jacob Carlborg doob at me.com
Mon Jan 28 11:43:39 PST 2013


On 2013-01-28 18:11, Dicebot wrote:

> 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.

What about getters and setters and gets and sets a value from a cache?

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list