After experimenting with Kotlin for a long time, my love for Java grows. Here are a few points I strongly believe that Java is better...
Worse parameter type casting. It is even worse compared to Java. At least, Java could detect an int object in a long parameter. Now if I create a method for long, I need to create int wrapper for it.
Hardship to create multidimensional array. Even if I agree that linear array is almost 99% of the case in real world scenario, if we somehow need it, like for CP, it is a terrible experience.
Immutable function parameters. It should be fine if the outside fields are immutable, but now, even within the scope of the function, we have to declare new variables and if we use the same name, we got the warning "shadowed name". It is even worse than Java.
No real interop for functional features in Java and lambda is a bit worse. This is not related to CP, but for software engineering. Another reason to not adopt it.
Well, there are more, but after trying Kotlin for sometime, I am increasing doubtful of its existence. There are hardly strong evidence for it in my opinion. Do you have any idea?
Thanks!
Then, by all your above arguments, there is no doubt Python is the best language.
array = [[0,]*m for i in range(n)]
Also try JavaScript!
Okay, fair, Kotlin is nicer than JS in my opinion, I just mean it is still no match for Java even thought I thought it was supposed to correct Java.
Python is pretty amazing, isn't it? My only problem with Python is that it is slow and no type (-> almost no good intellisense) or at least people normally use no type hint. Overall, it is a good interpreted language compared to R, Ruby and not sure but JS.
Auto comment: topic has been updated by duckladydinh (previous revision, new revision, compare).
Have you tried Scala?
1
You can pass Int for a Long (but not the other way around):2
Easy:3
Value parameters are immutable by design. Sometimes I find it a bit inconvenient myself. I guess Java scores here. The score then is roughly 1 : 100 :)4
The interop is there (hard to comment without seeing any concrete issues), I don't remember having to resort to inferior functional features of Java, ever. Scala standard library is feature rich beyond comparison with Java (or Kotlin, or probably any other language), especially when it comes to collection support.I never use Scala since I found it a bit more troublesome when I tried to start long ago (for Kotlin, learning it with Java knowledge and intellij took almost no time).
Yeah, it looks really nicer in many ways, but I just mean that I am disappointed about Kotlin since I thought a good Java's alternative has been found and whenever I attempted to use in a real case and things soon got problematic. I mean even if the score is 1:100, in the 1% case when you really need a feature and it is not there, it would mean disaster since it may have been too late to pick another.