Live data from Hacker News

Ask HN: Has anyone here programmed in Kotlin? What do you think about it?

news.ycombinator.com

61–70 of 203 posts

Re: Ask HN: Has anyone here programmed in Kotlin? What do you think about it?

#61

I've been using Kotlin for about three months to develop an Android application that is now in production. To be honest, I love it. Here's a comment I wrote a few days ago about my experience with it for Android development, from the perspective of someone coming from java: "Seconding Kotlin coming from Java. It takes maybe 2 days to learn everything in the language if you already know Java, and it fixes pretty much…

> a "the good parts" syndrome -- that is there are parts of the Scala standard library/common practices that everyone seems to agree are best to avoid

And what are those parts?

Re: Ask HN: Has anyone here programmed in Kotlin? What do you think about it?

#62

I wrote about Kotlin quite some time ago.[0] I have to say that at the time, I was quite impressed by it all. There were some really good features, it had a much smaller dependency compared to Scala, and so packaging a Kotlin application was a lot easier than say an application in Scala. But to answer your question, there are a few benefits and drawbacks of Kotlin as a language and a platform: + World class IDE suppo…

Regarding documentation, while you're right, I'd like to point out that Kotlin intentionally has a minimal standard library. The Java standard library is Kotlin's standard library (modulo some minor additions), and Kotlin is designed to make using the same APIs a lot nicer -- not to replace them with Kotlin-specific APIs. The preferred approach for creating a "Kotlin wrapper" if one is necessary is simply adding extension methods to the Java class. So while more detailed Kotlin documentation would certainly help, it requires much thinner documentation than other JVM languages that package their own rich standard libraries.

Re: Ask HN: Has anyone here programmed in Kotlin? What do you think about it?

#63

Earlier quoted context omitted.

I can't speak for JetBrains, but from my own experience with Java, Scala and Kotlin, Java interop in Kotlin is a lot better. Scala also offers a lot more features than Kotlin, which is great for highly experienced programmers, but usually means having to subset Scala for mixed experience teams. Kotlin seems to strike a better balance in terms of approachability and expressiveness, and hence being better suited for te…

Where would Clojure fit into this mix? How would its interop compare with Scala or Kotlin, as well as its performance?

Clojure's Java interop is smoother than Scala's, but not as seamless as Kotlin's. Kotlin is modern syntax for the same Java APIs and programming philosophy. Scala and Clojure are radically different languages (from Java as well as each other), for better or worse.

Kotlin is a modern Java-replacement, while Clojure and Scala have different strengths and weaknesses. That's not to say that you can't write many applications in any of the four languages, but the "feel" of the codebase would be completely different in Clojure or in Scala, while Kotlin would feel the same (but would be leaner).

Re: Ask HN: Has anyone here programmed in Kotlin? What do you think about it?

#64
post #45
post #14

At JetBrains we're using Kotlin on a few projects now. Some of them are internal, some are public facing. In addition, some of our existing (and new) products are now using Kotlin. IntelliJ IDEA 15 will be shipping with Kotlin plugin enabled by default. Kotlin is a tool we created out of need. We're using it and we're relying on it, so I'd say it's got a very good long term viability.

Do you still accept feedback about all those ugly ...@label, e.g. break@label? I really dislike it. Couldn't it at very least have a space between keyword and label?

Are you referring to labels or annotations? Annotations now use @. Labels are label@, break@label still remains.

Re: Ask HN: Has anyone here programmed in Kotlin? What do you think about it?

#65
post #20

Earlier quoted context omitted.

What was the need that Kotlin arose out of?

To summarize, we were looking for a language that could cut down our code base (IntelliJ platform and server side tools are written in Java), be concise but still expressive, toolable, as fast as Java, easy ramp-up time, and very important, interoperable with all the existing code base we had. Given the candidates at the time, it was decided to start Kotlin.

There's like 9000 programming languages. Not a single one was adequate?

Color me skeptical.

Re: Ask HN: Has anyone here programmed in Kotlin? What do you think about it?

#66

After reading this and seeing some Jetbrains blog posts about Kotlin before, I decided to try it out. I downloaded Intellij IDEA Community Edition, and with Java 7 already installed on my machine (OS X 10.10 - I use Java for RubyMine support), I went through the tutorial here: Getting Started with IntelliJ IDEA - http://kotlinlang.org/docs/tutorials/getting-started.html I started at about 12:55 (download time in Fire…

Your brain dump is fantastic feedback for us. Can really help us improve the getting started and docs. Thanks for this!

Re: Ask HN: Has anyone here programmed in Kotlin? What do you think about it?

#67
post #20

Earlier quoted context omitted.

To summarize, we were looking for a language that could cut down our code base (IntelliJ platform and server side tools are written in Java), be concise but still expressive, toolable, as fast as Java, easy ramp-up time, and very important, interoperable with all the existing code base we had. Given the candidates at the time, it was decided to start Kotlin.

There's like 9000 programming languages. Not a single one was adequate? Color me skeptical.

It seems that Kotlin was adequate, which is why they chose it. With no idea of the project or the team working on it, I'll assume good faith that they were right.

Re: Ask HN: Has anyone here programmed in Kotlin? What do you think about it?

#68
post #31

We built Roll for Android ( http://tryroll.com ) in Kotlin -- we currently have ~17k lines and have been working on it since this Spring. We wanted to iterate on a lot of the software structure we came up with for our Swift iOS app, and for a bunch of pieces we needed a powerful type system. So rather than just stick with Java -- as others have said, it's way too verbose, we started looking at alternatives. We wanted…

Kotlin is great, but I would like to point out a few things:

> Lambdas can be inlined!

Kotlin's inline functions are meant to serve as a poor man's macro system (to implement simple control structures) and/or for argument type specialization -- not to save the "inner class overhead" because, guess what? There isn't one! While HotSpot's JIT will certainly not inline lambdas in every circumstance (though it's getting better), it will inline them in all cases where Kotlin's inline functions can be used (and many others where they can't). It is possible, however, that inner classes do have some overhead on Android.

> Reified generics!

Kotlin does not reify generics, and like in Java, that's a good thing! Java's erased generics are precisely what makes polyglot interop easy.

Re: Ask HN: Has anyone here programmed in Kotlin? What do you think about it?

#69

I had never heard of Kotlin but after looking at the docs I am very impressed. I spend most of my time in the web development world (PHP, Javascript) but I am thinking about starting a small Android project. I have zero Java knowledge so I wonder if it is feasible to jump straight into using Kotlin or to try and learn some Java first?

Knowing Java is quite helpful if you're building for the JVM, but if your target is JS, then its not much of a problem.

Re: Ask HN: Has anyone here programmed in Kotlin? What do you think about it?

#70
post #67

Earlier quoted context omitted.

There's like 9000 programming languages. Not a single one was adequate? Color me skeptical.

It seems that Kotlin was adequate, which is why they chose it. With no idea of the project or the team working on it, I'll assume good faith that they were right.

Or yak shaving?

I remember reading comp.compilers for a long time and people would always post about creating the next great language. They first thing people (usually John Levine) would ask it, "Why does the world need yet another programming language?" Not necessarily to discourage, but to invoke thoughtfulness.

There's nothing wrong with new languages. But it seems people are popping them out left and right these days. I think Javascript frameworks are the only thing that come faster.

So, do we _really_ need yet another new programming language?

Down vote me all you want, but at least I ask the question.

Post reply on HN