Live data from Hacker News

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

news.ycombinator.com

121–130 of 203 posts

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

#121
post #100

Earlier quoted context omitted.

> I mean Maven really sucks Why? I think after a while one gets tired of using XML as a configuration language. It's verbose and not the easiest to read. Beyond that, we used to find ourselves in dependency hell with maven pretty frequently, though that hasn't happened to me in a few years. The biggest problem, imho, is that it's inflexible. You can't just (easily) throw in a bit of functionality or make an unusual t…

I think that calling something verbose and unreadable is an oxymoron. XML is very explicit about what each field is labeled. Having an XSD means you always know what field is available where and what type of values are permitted. BUT, if you're still not happy, there's always polyglot maven[1] [1] https://github.com/takari/polyglot-maven

> I think that calling something verbose and unreadable is an oxymoron.

Verbose and unreadable are not contradictory descriptions. In fact, they are more complementary descriptions -- there is a reason that in natural languages one of the most frequent recommendations for clear and readable writing is to be concise.

Excess verbosity is bad for readability.

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

#122

Earlier quoted context omitted.

In clr land we've already seen c# adopting a fair few functional things - I think largely ahead of Java. There's this pretty interesting article from an f# (if anyone's unaware that's a Microsoft built functional language on the clr) tutorial site addressing reasons to still use f# over it. It's quite opinionated but worth a read and largely applies to Java/functional on the jvm: http://fsharpforfunandprofit.com/post…

There is a Haskell implementation for the JVM if you want a language like F# (it's called Frege). Kotlin has some FP features. You can easily make immutable data classes (one line definitions of struct like things), you have map/filter/reduce/etc with a much more efficient approach than Java 8's streams framework, the compiler knows about tail recursion, there's some basic forms of pattern matching. I suspect Kotlin…

Sorry, I think I was a bit unclear. I have no doubt the jvm can support a functional language - scala isn't bad and Kotlin looks really nice. My point is more that Java is constrained in how it can compete with functional jvm languages in much the same way c# is against functional clr ones. The linked article explains those limits a lot better than I could :)

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

#123

Earlier quoted context omitted.

In clr land we've already seen c# adopting a fair few functional things - I think largely ahead of Java. There's this pretty interesting article from an f# (if anyone's unaware that's a Microsoft built functional language on the clr) tutorial site addressing reasons to still use f# over it. It's quite opinionated but worth a read and largely applies to Java/functional on the jvm: http://fsharpforfunandprofit.com/post…

There is a Haskell implementation for the JVM if you want a language like F# (it's called Frege). Kotlin has some FP features. You can easily make immutable data classes (one line definitions of struct like things), you have map/filter/reduce/etc with a much more efficient approach than Java 8's streams framework, the compiler knows about tail recursion, there's some basic forms of pattern matching. I suspect Kotlin…

And there's a very good implementation of OCaml for the JVM: http://www.ocamljava.org/

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

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

OK, so did Kotlin really cut down your codebase, and by how much?

We've not converted entire code bases, but based on what we're doing and feedback from others, we could say roughly around 35% or so.

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

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

Given the constraints we imposed on our decision, I'd say that number was quite lower.

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

#126
post #79

Earlier quoted context omitted.

> 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 RxKotl…

For tests : I have had some nice experience writing jUnit tests with pitest (PIT) : there is a gradle plugin to do that in AS/Idea

The only issue I had was to ignore Package class to make pit work

For DI, Dagger2 works fine with kotlin

For multithreading : Quasar supports Kotlin (I'm waiting for quasar to support android though)

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

#127

Earlier quoted context omitted.

FYI, pron's the author of a would be competing project to Scala's Akka (i.e. competing for share of distributed computing market on the JVM), and takes every opportunity to danger-danger-dragons-be-there on Scala related threads/comments. Saying that, there is always some truth in what pron brings to the table, it's sort of a higher kinded trolling ;-) As for Scala and PL concepts, sure, plenty on offer if that's of…

What is a pron? That's like a shrimp?

pron is the author of the GGGP post to the one you replied to.

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

#128

Earlier quoted context omitted.

When you say "Java 100% compatibility", does it mean you can rename a .java to .kotlin and kotlin compile would never complain?

You can mix and match Java files and Kotlin files in the same project without a problem. Also, for any Java file you can ask IDEA's Kotlin plugin to automatically convert it to Kotlin for you, and likewise if you cut-and-paste Java code into a Kotlin file it will ask if you want to rewrite that code block.

Kotlin's tooling for Java interop should go down in the textbooks as the prime standard for how to ease a programming language built for a run-time to mainstream adoption. It's just phenomenal.

Not that Kotlin is introducing anything like this, but, I wonder if this sets a precedent going forward for popular programming tooling vendors to evolve as the primary distribution point for introducing new programming language research and paradigms to the industry.

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

#129
post #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 exte…

> The preferred approach for creating a "Kotlin wrapper" if one is necessary is simply adding extension methods to the Java class.

You nailed it. I think that this is ultimately something that JetBrains must stress in their documentation and have extensive examples on how to go about doing this if Kotlin is to get much more widespread adoption.

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

#130
post #46

Earlier quoted context omitted.

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

Clojure devs don't seem to care about performance. Just check how the JVM gets the blame for what is essentially Clojure initialization time. There are some in the community trying to improve the situation, but those are kind of forks like Skummet.

> Clojure devs don't seem to care about performance.

Ridiculous. Clojure devs care a lot about performance. We just care more about correctness.

Post reply on HN