DEV Community

loading...

Discussion on: Why not Java

siy profile image
Sergiy Yevtushenko
  1. Date class is an old-fashioned way to work with date and time. There is a new java.time framework designed after Joda Time, one of the best tools dedicated to this topic.
  2. Java is not .Net and don't have to be.
  3. Lambdas in Java are replacement for anonymous classes. And like classes lambdas are first class citizens. If you need lambda with 3 parameters - create appropriate interface. What's the problem?
  4. As I told you, they harmful. And lack of them can't lead to any library since this is language level feature. As of asynchronous support, Java has CompletableFuture in standard library. This is, perhaps poorly named, but otherwise exceptionally good Promise implementation. So, there is no gap to fill. Nevertheless I'm happy that there is such a freedom since I wrote a replacement for CompletableFuture (and underlying scheduler). One of the reasons - my implementation uses Linux io_uring asynchronous I/O API which is only about a year old. Why should I wait for language developers if I can do that by myself?

As for Kotlin: it has couple of interesting ideas accompanied with pile of poorly thought out code size reduction hacks. Overall mix results to significant mental overhead which negativity impacts productivity, despite claims. By the way, it doesn't solve any real Java issues which Java unable to solve by itself. On the other hand, it might fit better to your expectations as it provides many useful tools to create mess in codebase, freedom to put any class in any file and extension methods are among them.