DEV Community

Discussion on: Why I prefer Kotlin

Collapse
 
stealthmusic profile image
Jan Wedel

Have you tried Lombok with Java? Since we started using it, my team loves it. @Data is what you want.
The only thing I'm missing from Erlang is Pattern matching, but at method signature level. I think also Kotlin can't do it, right?

Thread Thread
 
grahamcox82 profile image
Graham Cox

I used to use and like Lombok, but less so now. It looks and reads like real Java but does things behind the scenes, which isn't obvious if you don't know about it. Using a different language is much more obvious what's happening, even if it's much bigger.

Data classes are also only scratching the surface of the extra features - better lambdas, destructing, coroutines, etc. Even just template strings can be a huge boost if you're writing things like DAOs with complex queries in then.