Live data from Hacker News

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

news.ycombinator.com

71–80 of 203 posts

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

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

No it's more like 9000 implementations of the same programming language. Only those from academia have ever been new languages.

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

#72
Well, let's look at the JVM landscape. First of all Oracle has (finally) picked up the pace in terms of evolving Java and the JVM.

This is a bit of a double edged sword for alternative JVM languages since on the one hand JVM improvements (like current SAMs and value types in Java 10) are a big win for all involved, but on the other, Java's evolution is very much a threat to Scala, Kotlin, and Ceylon in particular*

Why is Java's evolution a threat? As Java cherry picks functional idioms from, for example, Scala, the motivation for Java teams to pick up Scala is reduced. Arguably Kotlin is in a worse position as its main "problem" is being too similar to Java. Already Java has deprecated the `_` character so shouldn't be any surprise to see `roster.stream().filter(_.getGender() == Person.Sex.MALE)`, land in the language [1]...getting pretty Scala-like o_O

Kotlin's window of opportunity is in the next 2-3 years, basically before Java 10 lands. If an ecosystem develops around it (likely one of the reasons adoption rates are so low at present) and their 1.0 comes on the scene soon, they can steal some limelight from Scala, and maybe put Ceylon in the rear view mirror.

* Clojure and JRuby are probably safe given their non-Java roots, and Groovy, not sure where it would be without Gradle.

[1] https://docs.oracle.com/javase/tutorial/collections/streams/

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

#73

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?

After the start time, In my testing, I have never seen Java code that's faster than it's commensurate Clojure code. I've seen the reverse.

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

#75

Well, let's look at the JVM landscape. First of all Oracle has (finally) picked up the pace in terms of evolving Java and the JVM. This is a bit of a double edged sword for alternative JVM languages since on the one hand JVM improvements (like current SAMs and value types in Java 10) are a big win for all involved, but on the other, Java's evolution is very much a threat to Scala, Kotlin, and Ceylon in particular* Wh…

I find it highly unlikely that java would adopt the implicit lambdas using underscores from Scala. The rules regarding precedence themselves are quite simple, but they're not always what new users expect, and cause too much confusion to be appropriate in java. Much more likely is the use of the underscore as an anonymous placeholder in pattern matching. Although even full pattern matching seems a bit much for java in the near future. Pattern matching is more useful than implicit lambdas anyway, the latter being nothing more than a terser syntax for regular lambda expressions to approach the concision of Haskell's point free style without leading to code that's too semantically dense. Pattern matching actually makes new kinds of static guarantees possible.

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

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

Was there a need to develop a Java IDE in Java to begin with? I can understand dog fooding by building IDE-primarily-for-lang in lang itself. But were there technical reasons?

Or maybe Java just was the best alternative [at the time].

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

#77
I've been using Kotlin on-and-off as a Java replacement and I've really enjoyed it.

A couple of months ago I used Kotlin to setup a Dropwizard project and it was a breeze so I put together an example on GitHub to serve as a starting point for others: https://github.com/doomspork/kotlin-dropwizard

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

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

Was there a need to develop a Java IDE in Java to begin with? I can understand dog fooding by building IDE-primarily-for-lang in lang itself. But were there technical reasons? Or maybe Java just was the best alternative [at the time].

The three founders of JetBrains started a plugin named Renamer out of need, while working with Java code at TogetherSoft. That was over 15 years ago.

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

#79
post #55

Earlier quoted context omitted.

What Kotlin still misses is somehow a good testing ability, to test it via Java Test Suites seems strange. Also I still miss a good build tool. I mean Maven really sucks, Gradle is kind of okai, but there is no support of autoreload project on change (like sbt has via sbt-revolver or playframework internals) however that is mostly helping web development. Also some other things aren't really written out, like threadi…

> What Kotlin still misses is somehow a good testing ability, to test it via Java Test Suites seems strange. Why? > I mean Maven really sucks Why? > Also these days a language needs Dependency Injection There's plenty of JVM libraries that provide it. Why does a language need to provide it?

Currently it sucks to write tests with JUnit while using Kotlin, there is Spek (Jetbrains made it(, but it's early (too early).

XML based Build Tool, I mean seriously? It should at least be somehow human readable.

A language should need a sane integration of it, not the library itself. Okai DI is definitly somewhat that isn't needed, but a good integration is still suitable.

I mean good Multithreading lives in RxKotlin which is based on RxJava, however I still think that Threading or some kind of Library which should handle mutli prozessors / async capabilities should live INSIDE the language (like go, erlang or lots of others).

I mean currently Java9 will get a lot of new things which will definitely help out Scala to compile faster and Java10 will bring these closer. So there is no real reason for a language that still lacks a lot of stuff. As already said, Kotlin is small, on some edges thats good, on some it's just too small and I don't get it why they built while, break and continue into a somewhat functional language. Especially when while, break and continue is really hard to handle / read.

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

#80

Always looking for something more simple than (my current) Scala. - Argued with the developers, they have not clue about Option/Maybe and what it's good for. They offer non-nullable type which solves just one - minor - problem with Null - No deconstruction - Their documentation in the beginning mixed features and planned features without discrimination. Spend a lot of time to find out trying to make them work that th…

The development team has always been very friendly and welcoming. I suspect that they didn't have time for someone who was interested in "arguing" with them.

Since Kotlin can leverage JVM libraries, why not use Google Gauva? https://code.google.com/p/guava-libraries/wiki/UsingAndAvoid...

Post reply on HN