Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

After trying Kotlin for some time...

Revision en2, by duckladydinh, 2019-09-21 08:27:30

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...

  1. 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.

  2. 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.

  3. 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.

  4. 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!

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English duckladydinh 2019-09-21 08:27:30 2
en1 English duckladydinh 2019-09-21 06:15:53 1214 Initial revision (published)