I have been playing with Kotlin for a while now. It’s a really nice language that improves on areas that Java needs improving on. I just wanted to share my thoughts here:
I know that JetBrains is not an Eclipse company. But limiting your toolchain to IntelliJ will make it really difficult to gain traction. Most of my projects are Eclipse only. I’m just tolerated as an IntelliJ user. It would be very hard to suggest to these shops to try out Kotlin. I’m cool with that. Go ahead, make the IDEA plugin as perfect as possible. For the rest of the developers, I’m not so sure if that’s the best path to go down, though.
That’s an area that I haven’t been happy with. Just to name a few things:
- Visibilities: which visibilities are there in Kotlin and what do they mean? There are differences improvements over Java but that’s something the documentation should go into!
- main: You need to have an entry point to run your code. In Java you’d start out writing a couple of classes, each with a main method. It doesn’t work that way in Kotlin, because of the visibility of the main function. As a new user that just wants to play with a couple of things you’re stuck at that point. Also: the Getting started part of the documentation really isn’t about getting started but more about downloading plugins. Pointing to IDEA 13 EAP build configurations really is so yesterday…
- Collections: There really isn’t much you can do without lists, maps, and so on. The documentation only seems to mention arrays. How Do I create lists? Is there anything special about them in Kotlin? Even: how do I need to declare a list variable and assign values to it? Of course, there’s an answer for that, but not in the documentation.
- Comparison with Java: How does Kotlin compare with Java, especially with Java 8? For example: Java 8 has some limitiations with closures (can only access variables that are considered final, Exceptions – UncheckedIOException). I think there should be a comparison between the new Java 8 features and their equivalent in Kotlin (closures vs. function literals, method references, it, …). How does Kotlin deal with SAM, default methods in interfaces, static methods in interfaces? Anything special about the streams API (e.g. Kotlin has zip, Java 8 hasn’t). Java 8 currently is a hot topic and I believe these questions should be answered by the documentation. Is Kotlin redundant, now that Java 8 is available? I believe no, but the documentation should make a strong point about that fact (and explain why)!
I really enjoyed reading through the Ceylon documentation. It’s pleasant to read and has plenty of examples that help you understand the design concepts. I believe that the Kotlin language deserves something similar. I know that this is hard, especially when resources are limited. But if this evil world tells uns one thing, it probably is that you should always present yourself in the brightest light as perfect as possible…