writing java code for the first time in a year i m...
# intellij
c
writing java code for the first time in a year i must say that kotlin is nicer to read, but java is just as easy to write, idea fills in all the verbosity and boilerplate automatically.
d
... which you then have to maintain 🙂 There is no argument that it's very easy to just let IntelliJ cough up all the getters, setters, constructors and whatnot. But once it's done, you have to keep it up to date.
👍 3
c
right. but java does not force me to add getters and setters.
a
Agree with @diesieben07, the ability to generate the boilerplate code hides the fact that a non-standard implementation of a method. This can make the maintenance and regeneration of methods like equals() & hashCode() fraught with dangers. If you are not declaring getters & setters are you properties publicly exposed & mutable, that's v. dangerous
c
not declaring getters and setters does not make my attributes mutable. But I agree that setting all properties in the constructor is very painful without named parameters and without a copy constructor. thats why data classes rule
p
try if mapping over a hashmap changes your opinion. much harder to write in java.
c
hehe it was just my first impression after writing 10 lines of java for the first time in 2 years.