3 ms·
In terms of language features, lack of properties are the thing that is keeping me from using java. I would love to be able to have public variables, with the
by MereInterest 12y ago
In terms of language features, lack of properties are the thing that is keeping me from using java. I would love to be able to have public variables, with the understanding that I could just convert them to properties later on if I need to. Instead, java conventions suggest that I always make a getter and setter for every single variable that I want to expose.
- skybrian 12y agoSome Java conventions are unfortunate. Setters aren't a great idea, actually. The Guava team recently open-sourced AutoValue as a more modern approach: https://github.com/google/auto/tree/master/value https://github.com/google/auto/tree/master/value
- pivo 12y agoFixing this stupid issue seems like such an obvious thing to do I can't imagine why it wasn't addressed ages ago. Having property notation would immediately get rid of 30% of the code in the codebase I currently work with, and that seems incredibly valuable.