News for hackers. Stuff that matters.
Re:Data Classes for Java by HumanDrivenDev on Wednesday November 01, 2017 @08:51PM (#15606925)
Why not give your "setters" a real name that describes what they're doing?

https://news.ycombinator.com/item?id=15606777

In the structs & records world (C, F#, Rust, etc) they never seem to have this issue. Either the struct is completely transparent and you can read and write fields at will, or it's completely opaque and the functions that operate on it have better names/semantics than "setField".

There are no comments on this comment yet.