Lombok, RxJava/Reactor where possible, and monads everywhere. It is beautiful and succinct, though I totally appreciate it may not always be easy to introduce on older frameworks or legacy projects.
Lombok, RxJava/Reactor where possible, and monads everywhere. It is beautiful and succinct, though I totally appreciate it may not always be easy to introduce on older frameworks or legacy projects.
If an object is just data, then @Data is all you need. If an object crunches numbers, then @Service with @RequiredArgsConstructor if you don't prefer to @Autowired things individually.
Any other usage of Lombok is possibly indicative of a questionable application design imo
There's no accounting for taste, but I'll take either Scala or Clojure on the JVM any day of the week. Scala's monads don't feel like a library feature, they feel baked into the language...because they are.
That said, I did hear Java is getting value types soon, or something like that. A bit too little too late maybe, but welcome nevertheless.
If I had the choice I wouldn't use Java again; JVM is fine, but there's better languages for it than plain Java. Kotlin seems alright. Wouldn't use Scala again, that's a language for sadists.
Java has had records (the thing that's like Lombok) since Java 14.
What Java is soon getting is inline value types, i.e. datatypes that work like primitives (are pass-by-value; have no identity but rather structural equality; are freely copyable; can be held on the stack, or intrusively within a containing array; etc.)
I’ve not used kotlin but people I respect say it’s great, maybe that’s better than Scala.