News for hackers. Stuff that matters.
Re:Java 1.0 Turns 25 by noisem4ker on Saturday January 23, 2021 @10:27AM (#25882866)
>Getters and setters

Meet Project Lombok. Problem solved and forgotten.

Re:Java 1.0 Turns 25 by Vax45 on Saturday January 23, 2021 @10:58AM (#25883149)
I prefer Immutables for code generation. Lombok tends to interfere with Eclipse' code evaluations (last time I used it, it kept interfering with searching for a generated method's usage in your code base) and tends to confuse me when trying to figure out if something's an actual method or a method that was injected into the AST during compilation.

Immutables has its own set of problems, but at least it uses the standard Annotation processor and has a clear separation of generated code and the interface you write.

Haven't used Java's new record's yet, so don't really know anything about that.

Re:Java 1.0 Turns 25 by dehrmann on Saturday January 23, 2021 @01:04PM (#25884601)
I can't remember the exact issues, but there's enough magic going on in Lombok that it doesn't play well with Kotlin, so you're better off with Autovalue or Immutables to future-proof things. I also generally don't like how much magic Lombok uses, regardless of if you needs support for any other JVM languages.
Re:Java 1.0 Turns 25 by zmmmmm on Saturday January 23, 2021 @08:00PM (#25887722)
After spending nearly a whole day trying to get a lombok build configured and working in my IDE ... I just gave up on it. It's a nice idea but I prefer to use something like Groovy where the AST transformations happen directly in the language space rather than in a meta-build step that requires so much IDE involvement. (not to mention most of them not even needed because Groovy just does those conveniences by default).
Re:Java 1.0 Turns 25 by ivan_gammel on Saturday January 23, 2021 @10:54AM (#25883100)
Well, no, it is not. Lombok does not mask invocations, so it is still foo.getA().getB().getC()