3 ms·
If you get married, you might "changeLastName" or maybe even "rename" yourself but if you're just moving that name from one place to another you'd "set" it. Yo
by wvenable 9y ago
If you get married, you might "changeLastName" or maybe even "rename" yourself but if you're just moving that name from one place to another you'd "set" it.
You could probably come up with lots of different names but none of them will be more clear than "set" in this case.
- usrusr 9y agoIf moving requires a name to be set you are at constructor time, no need for permanently available setters.
- wvenable 9y agoTwo things with that, you're assuming immutability but even a simple database entity object wouldn't be immutable. And secondly, anything over a handful of values and setting them via a constructor isn't pretty.