Timeline for Should a method modifying object passed as a parameter return the modified object?
Current License: CC BY-SA 4.0
3 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 9, 2023 at 20:54 | vote | accept | Shaolin | ||
| Jun 9, 2023 at 19:13 | comment | added | Christophe |
sorry, but there is no implication that the object won't be changed in the second approach. Method chaining and fluent interfaces are still popular. A prefix convention would be advised (such as with to tell that the original value doesn't change: blog.joda.org/2011/08/common-java-method-names.html?m=1 )
|
|
| Jun 9, 2023 at 14:04 | history | answered | Philip Kendall | CC BY-SA 4.0 |