Live data from Hacker News

Kotlin 1.0.5 is here

blog.jetbrains.com

11–20 of 111 posts

Re: Kotlin 1.0.5 is here

#11

Kotlin is great and we're using at in the backend at Datawire.io. Also we're hiring! Check us out if you're a backend JVM/Kotlin developer and are in the Boston, MA area! https://www.datawire.io/careers/

Do you use any specific Kotlin (or other JVM lang) web framework for your backend, or did you roll your own?

Vert.x 3 currently. First class Kotlin support is dropping before the end of the year according to the Google Group for Vert.x but for right now the excellent Java/Kotlin interop hasn't prevented us from building.

Re: Kotlin 1.0.5 is here

#12
post #9

I have became a 100% Kotlin convert. Every single project I work on now is using Kotlin. I have also found that if you are using LibGDX Java game framework, it's very trivial to convert it to Kotlin. I have been doing that pretty extensively and it has been very pleasant. Feel free to check my GH for some examples. Most notably, the Bayesian Classifier. Also be sure to check out the Kotlin slack room. It is filled wi…

On the topic of using the JVM to make games, do you find yourself using the trick of not allocating any new objects (wither from Java or Kotlin) within the game loop? I've heard of that trick, and am considering using it because GC pauses are the main reason I'm considering avoiding the JVM for games.

Definitely. The use of object pools for performance is common in game development regardless of language.

It's something that I tend to add in as needed or when I have decided that a game I'm working on warrants this level of engineering. (i.e. I wouldn't care about it as much if I'm just programming pong or Tetris.)

Re: Kotlin 1.0.5 is here

#13

Kotlin has been a joy to use. Really happy with it. Our Android app ( http://play.google.com/store/apps/details?id=com.eatsa.app ) is 100% Kotlin (with a good amount of Java libraries of course). Some highlights: - Great type system, with type inference. - Full Java interop. You can literally copy/paste Java code from Stackoverflow and it's automatically translated to Kotlin. It doesn't feel like 2 different language…

My first thought was, a post to promote an app. But then, realize it's Eatsa so it probably doesn't need any promotion. What I like to know is the following: What are some of the challenging issues of using Kotlin? Did you start from Kotlin or migrated from java to Kotlin? What drove the decision to use Kotlin in such a visible app? What are the top 3 - 5 improvements or things you want to see? Thanks

Yeah, I only included the link as a proof that we're actually using Kotlin in production :)

1. Kotlin issues:

- Libraries that use reflection (such as Gson) can break some assumptions that Kotlin makes (for example, a read-only field may actually change). There's maybe 2 or 3 little things like that that may catch you by surprise, but once you figure them out it's easy to work around them.

- Stack traces in lambdas are obscure sometimes. Sometimes you won't get the line number.

- Proguard integration has proven challenging.

2. We started from Kotlin.

3. Learning Clojure and Haskell has made me yearn for more functional languages and better type systems. Kotlin has that, in a neat syntax that's very beginners friendly.

I'm firmly convinced that a good programming language needs:

- Strong library ecosystem

- Static type system + type inference. (I won't get into the static/dynamic argument here. Suffice to say that there's a whole class of bugs that you can avoid with static typing, and type inference makes the "but I hate these types cluttering my code" argument irrelevant)

- Killer IDE support (essential for productivity. If you're writing a large application without using an IDE that gives you code inspection and navigation, you're wasting your time)

Kotlin has these 3 things.

4. Top improvement: can't wait for Kotlin 1.1 to be released, and start using coroutines. Other than that, I'm happy with it.

Re: Kotlin 1.0.5 is here

#14
post #9

Earlier quoted context omitted.

On the topic of using the JVM to make games, do you find yourself using the trick of not allocating any new objects (wither from Java or Kotlin) within the game loop? I've heard of that trick, and am considering using it because GC pauses are the main reason I'm considering avoiding the JVM for games.

Definitely. The use of object pools for performance is common in game development regardless of language. It's something that I tend to add in as needed or when I have decided that a game I'm working on warrants this level of engineering. (i.e. I wouldn't care about it as much if I'm just programming pong or Tetris.)

Awesome thanks for the advice. Maybe one day I'll get around to making that video game I wanted to make 15 years ago. :D

Re: Kotlin 1.0.5 is here

#15
Saw a great Kotlin talk by Hadi Hariri from JetBrains at Javazone this year. [1] What I liked about it was that instead of the usual "this is how you do X in language Y" it focused on the immediate value it could bring to professional developers used to Java. Made me really want to try it out and start using it at my job.

[1]: https://2016.javazone.no/program/kotlin-ready-for-production

Re: Kotlin 1.0.5 is here

#16

Saw this pop up in my IDE this morning, excited to upgrade. The auto-for-loop-refactoring is interesting. I've found I never use for-loops in Kotlin - between the abundance of iterator methods and concise trailing-closure syntax, it always ends up being more concisely expressed as collection.forEach { ...body... }. Seems like the language may be going that way too; I wonder if we'll eventually see the for-loop start…

I make it a point never to use a for loop in JS. It's sometimes tricky but often leads to cleaner code.

Re: Kotlin 1.0.5 is here

#19

Kotlin has been a joy to use. Really happy with it. Our Android app ( http://play.google.com/store/apps/details?id=com.eatsa.app ) is 100% Kotlin (with a good amount of Java libraries of course). Some highlights: - Great type system, with type inference. - Full Java interop. You can literally copy/paste Java code from Stackoverflow and it's automatically translated to Kotlin. It doesn't feel like 2 different language…

Is the iPhone app a completelly diferente codebase?

Re: Kotlin 1.0.5 is here

#20
post #18

Is there anybody switching from Scala to Kotlin?

I can't imagine anyone who has used Scala for long would switch to Kotlin. Kotlin is 'Java++'. Scala is a fully featured functional language.

Kotlin is missing all of the most powerful Scala features. No type classes, monadic comprehension, higher kinded types, adhoc polymoprhism. :(

Post reply on HN