Live data from Hacker News

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

news.ycombinator.com

101–110 of 203 posts

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

#101
post #67

Earlier quoted context omitted.

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…

Well, 99% of those are silly little "my first programming language" thingys, and these are easy (if you care about those things) to recognize and ignore. They invariably focus on syntax: removing the semicolon, or braces, or some other trivial thing along these lines. BTW even those can be useful for PL researchers as the language may have an interesting new idea or a new way of doing things. Highly unlikely, but does happen.

On the negative side, and this is really bad, some of these may be picked up simply because they are new, and then they just create negative value for people that pick them up (e.g. Coffescript) and fragmentation. Then they get abandoned because there is another newer thing. Sad.

Then there a languages made by people with background in creating viable (as in not-just-academic) languages. Typescript and Go comes to mind. These are good and "we" need them. These may add new features to the table, eg generics or union types or goroutines.

There is no easy answer to your question, my best answer is "depends on who made it".

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

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

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

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

#103
post #49

Earlier quoted context omitted.

The two languages have completely different philosophies. Kotlin is a strict adherent of the Java philosophy[1], a "blue collar language" that adopts only tried-and-true features, with PL research being a non-goal. Scala OTOH, adopts almost every new PL concept, and PL research is very much one of its goals. A quick look at Scala's list implementation will show you how different those languages are. Kotlin is a moder…

As the Scala tech lead, I'm glad to learn we've finally adopted "almost every new PL concept!" I guess by now everyone will recognize your username and adjust for bias accordingly, but still, how about sticking to the facts?

As someone who doesn't follow such things (eg; I don't recognize the "pron" or "adriaanm" usernames, and haven't used Scala or any other JVM language), I found your comment to be a turn-off towards using Scala. That's not the kind of mature tone I'd look for from the tech lead of an open-source language.

That said, it is good to know that "pron" was incorrect/exaggerating when they said Scala adopts a lot of PL concepts; thanks for setting the record straight (though I'm still just not sure where Scala stands on that after reading this).

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

#104
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

Why why why do do do you you you think think think that that that a a a language language language that that that was was was verbose verbose verbose could could could not not not also also also be be be unreadable unreadable unreadable ? ? ?

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

#105
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

Interesting you say that because I feel that XML is a bit oxymoronic a priori. They wanted something both human and machine readable, but fails to be great at either.

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

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

They didn't choose Kotlin; they created it. (Though, having looked into alt JVM langs recently, I agree that they probably made the right choice in creating something new).

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

#107
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…

Your comment on build speed is interesting. Do you have a ballpark figure for Kotlin compile speed in lines per minute?

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

#108

Earlier quoted context omitted.

As the Scala tech lead, I'm glad to learn we've finally adopted "almost every new PL concept!" I guess by now everyone will recognize your username and adjust for bias accordingly, but still, how about sticking to the facts?

As someone who doesn't follow such things (eg; I don't recognize the "pron" or "adriaanm" usernames, and haven't used Scala or any other JVM language), I found your comment to be a turn-off towards using Scala. That's not the kind of mature tone I'd look for from the tech lead of an open-source language. That said, it is good to know that "pron" was incorrect/exaggerating when they said Scala adopts a lot of PL conce…

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 interest, but not at all a requirement in using the language. A great example of a highly successful project based on the non-FP-centric aspects of Scala is Spark. See their high performance computing style guide [1], no monad transformers there...

[1] https://github.com/databricks/scala-style-guide

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

#109

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…

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/posts/is-your-language-unre...

They take a different view to the comparison, looking at things the language enforces more than features/syntax it permits. Of course backward compatibility and plain sanity stop Java making such enforcements so the argument is that the functional languages maintain some strong advantages.

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

#110
post #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 b…

I haven't looked into it much in the past few years so it is possible the inner class overhead on Android is not significant anymore, but a few years ago it was definitely something to watch out for on Dalvik.

Again I wasn't being very clear, sorry about that: Kotlin doesn't always reify generics, but it can for functions you mark as inline if you want (it's useful!). Check out the inline function docs!

Post reply on HN