Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I used Kotlin for basically all of our machine learning/classifier code in a pretty large map/reduce + storm pipeline and have had no problems.

IntelliJ also does not seem to have any problem with it either. (The IntelliJ authors being the the creator of Kotlin) In terms of code size, Kotlin is definitely smaller and easier to maintain. In terms of raw/clean compile speed, I would expect it to be a bit slower, but there are ways to improve it. One of the bigger ways is via incremental builds. I.e. Only build changed chunks of code, which Kotlin supports, and is comparable to, and in some cases faster than Java: https://medium.com/keepsafe-engineering/kotlin-vs-java-compi...

In terms of executable size, I don't have good data, but will investigate, but I'd say likely not a major deterrent given all the other value adds. :)



So how long would a generic heavy 100 kloc project take to compile?

Full compile and changing one 200 line library file used by 1/4th of the project?


I don't know. The experiments in the post only shows a limit set of examples.

My hunch is that if you are using a modern compiler/IDE, you will not be coding -> compiling -> running that frequently. I typically code a lot before I actually actually run anything, so I'm not usually waiting around on a compiler. I don't even notice, at all, Java's incremental compilation when coding in IntelliJ. I refactor like a madman.

Also, Kotlin is not very ambiguous, and the type inference that it does enable does not escape the scope of a function so the compiler doesn't have to do that much work. (functions require strict typing). I would guess much of that lambda work gives it a small headache, but probably not that much worse than Java's. If Kotlin grows mainstream, it's already pretty good compiler, will only get better.

Of course, that is all a hunch. :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: