Hacker News new | ask | show | jobs
by coopernurse 5275 days ago
Agreed. Once you use a language with type inference it's hard to go back to Java.

Java also lacks properties, which results in boilerplate getter/setters if you want to follow idiomatic convention (you could make all the member variables public, but your coworkers would probably shun you).

1 comments

There are alternatives. e.g. a public final Property<String> Name = new Property<String>();

Where Property defines a .get() and a .set();

However, getters and setters are generally a code smell. It's better to be telling objects to do things rather than ask them for information. Modern Serialization & Injection frameworks no longer require getters/setters.