3 ms·
You also have that problem in a language with non-synthesized setters, because there's no guarantee that they don't do anything - and people avoid permitting di
by cballard 11y ago
You also have that problem in a language with non-synthesized setters, because there's no guarantee that they don't do anything - and people avoid permitting direct field access, so you'll be going through a setter with unknown behavior.
That being said, if you're throwing off side-effects like mad in setters, short of prohibiting either mutability or side-effects, there's not much the language can do to prevent that.