Re:Rust is a hard way to make a web API
by WClayFerguson on Saturday January 16, 2021 @03:28PM
(#25805197)
The Java languages gives you the choice of whether to use getters/setters or not. You added a good example. The main reason I love getters/setters is they are a 'hook' to add any code (like logging) if you want to detect when a variable is being read/written.
For example, I prefer
IMHO, it is much simpler and easier than classic POJO + Builder patterns. or even more classic