3 ms·
The author admits you indeed cannot avoid using them sometimes and mentions exactly the validation case as one of the times you end up writing something similar
by striking 9y ago
The author admits you indeed cannot avoid using them sometimes and mentions exactly the validation case as one of the times you end up writing something similar to a setter anyway.
You agree with the author but haven't realized it, I think.
- jonhohle 9y agoNo admission is necessary. There is an entire class of immutable languages (typically functional), which don’t allow mutation (and therefore don’t need setters).