My thoughs on Kotlin

3 08 2011

As a JetBrain’s Fan boy

I’m totally fan of JetBrain’s products. I’m using IntelliJ since the 4.0 version, even I develop a plugin for it. And seriously guys, this people know A LOT of programming languages; JetBrains develop IDE’s for Java, Python, (J)Ruby, HTML, JavaScript, PHP (originally developed by the community) , Objective C/C++, and have plugins for Groovy, Scala, AspectJ, ActionScript/Flex, SQL, JSP (including EL and JSTL), ERB, HAML, LESS, SASS, XML, YAML, Velocity, FreeMarker, Django Templates, Clojure, CFML (same as PHP) and many others. (without count, .Net products)

The development API for those IDE’s is so powerful that the community already contribute with many others (Including some esoteric languages): Arc, Bash, Erlang (this plugin is developed in Scala, EPIC geek) Fantom (very good plugin, seems to be abandoned, 😦 ), Gosu, Go (exists plans to develop a stand alone IDE using the IntelliJ Community Edition), JFlex, Lua, OCaml, Scheme, Power Shell and many others. Those plugins vary in quality from WOW to Eww!!, but is a good indicator for the quality of the language support on JetBrains products.

But, also Kotlin isn’t the first language that JetBrains develop. BaseLanguage is the language that come with MPS (Meta Programming System). MPS is a implementation of Language Oriented Programming paradigm. In plain English with MPS you can develop your own DSL and the MPS IDE will give you support, How? Extending the BaseLangauge (or creating a new one if you want). MPS isn’t too mainstream (A Hipster tool) but is already battle tested. YouTrack The JetBrain’s issue tracker was developed with MPS.

I think that we’re in good hands, JetBrains have all the experience and the knowledge to create a very good language, and of course with SUPER COOL IDE support from day 0. Also the feedback of the community is HUGE in the Kotlin Site. If JetBrains could embrace the community and listen them, they could develop a very successful language.

As a Scala Fan boy

I love Scala, Scala is my new best friend. I learn in two years with Scala more Computer Science than in five years with Java. Scala is a beautiful language that never end to inspiring me and amazing me (also scaring me).  Since I develop with Scala I’m a better developer; my code, even in others languages, seems to be more thread safe, more functional; but also Scala makes me a better son, citizen  and brother. Scala will lead us to a new golden age of prosperity and peace, a new renaissance of arts and philosophy. A beautiful new world.

But, let’s face the truth (please brothers of the Scala church, don’t kill me as a blasphemous) Scala’s complexity isn’t a Myth. (But I don’t agree with Gavin King)

Let me explain. If you come from a first world country with a very good High School program and Computer Science program like Swiss, Sweden or Norway; Scala isn’t complicated, but for people like me, that come from a third world country, with a Educational System “a little below the average” is complicated. I found myself studying countless hours to have “a little below the average” proficiency with Scala, I’m not complaining, was a VERY fun time, but, seriously guys is complicated.

Scala is more complicated than Java. Sure, you can use Scala as better Java, but is like buy a Lamborghini Gallardo to recharge your iPod, yes it’s works, but you’re losing a lot of features. In the other hand Kotlin IS a better Java, with good additions. A Java developer will be proficient in Kotlin in a fraction of the time, compared with Scala.

But Scala and Kotlin don’t need to be mortal enemies, If we can achieve a good interoperability between Kotlin, Java and Scala, we can have polyglot projects, so we can use the right language for the right type of problem. Also if you want to learn Scala a very natural way will be Java -> Kotlin -> Scala.

As an IntelliJ Scala plugin user

I think that the Scala support IntelliJ support is very good. Some great names in the Scala community are using IntelliJ and they are happy with it. Some FUD spread around the community with the announce of Kotlin thinking that maybe JetBrains will stop the development of the Scala plugin. Guys, this is the real world; the Scala plugin helps JetBrains to sale many IntelliJ licenses… JetBrains never will stop to develop the plugin as long as be good for business. Period

As a IntelliJ Power user

Obviously I use IntelliJ every day, but also I develop plugins. If JetBrains could use Kotlin to be more efficient in their developments all the users will win. But also they can test their new toy in a very hard scenario (Believe me guys, IDE’s are on of the most challenging scenarios for a language, and a developer).

As a business man

I have my own company (an one-man-army operation) I’m the Chairman, CEO, CTO, Sales manager, Development manager, Help Desk operator, architect, developer and tester. If I want to survive competing with other companies (big and small) I need a extra advantage, a secret weapon. My secret weapons are my tools (for more info on the subject you can read this post from Paul Graham). With IntelliJ, Spring Framework, Spring Integration and others, I actually defeat some bigger companies, with more developers, resources and money; delivering projects in a fraction of the time and costs with more quality. Scala provides me a huge competitive advantage… as long as I work alone.

But my little baby is growing, in less than a year I’ll  contract a few developers to achieve more bigger projects. Teaching Scala to a development team could be very challenging and frustrating and I COULD lose part of my advantage. But Kotlin seems to be a safer bet, More similar to Java, better integration, better IDE support, a huge productivity boost compared to Java… Kotlin could give more business value than Scala… heartbreaking history but true

But also if the language is successful (and have all the factors to be a success) there’s a lot of opportunity business waiting for us: Books, conferences, seminars, courses, libraries, tools, frameworks, certifications, t-shirts, mousepads, mugs and others, in fact a new beautiful world.