DEV Community

loading...

Discussion on: Java is Dead - Long Live Java

Collapse
greenroommate profile image
Haris Secic

Great post, finally summarised stuff I talked about to a lot of people. Kotlin was supper good looking easy etc but it some problems in the beginning when I tried to integrate it with Spring. Of course now it's super fine with a lot of stuff but Java 11 then 13 happened so it was much easier to rewrite project to new Java rather than new language. Clean up a code with vars and there you go :D. Data classes and lombok didn't provide me much as my domain models usually don't have getters and setters and response/request classes are mostly written by Alt + Insert and choosing getters and setters in IntelliJ. And Scala was hard to learn because I had to learn also new frameworks and crazy stuff from Erlang like Actors (ok those are older but Erlang was famous for implementing them). So I postponed it and left it to learn later, in case I need more performance with large data. Meanwhile Java got faster with Rx and I'm still waiting for fibers to clean up the mess I made with --> some(this::linked).map(x -> calls(x,"anothervar")).toList().toMaybe().

I just still miss very much ?. and ?? from C#. Or Kotlin ones i think ?:. That's about it. I agree with a lot of people on Kotlin looks better but I still don't see that much benefit. And begin more functional does not solve every problem. Neither does immutability. If you have problems with state it might be framework or your code some times not mutability itself. Data classes from Kotlin gave me so much more code to write because I needed to let users enter wrong stuff and validate it to get correct error message to them rather then being unable to compile or hacking a way through getting good enough messages. I guess it's my code writing style that keeps me from new languages. I even considered learning Elixir because I like the syntax and it's great for real-time stuff but even it's developers admit that it's slow in some cases where data is big and slow to process. So I'll wait for loom :D

Collapse
stealthmusic profile image
Jan Wedel Author

Sounds like a good plan to me 😊👍