Live data from Hacker News

Kotlin 1.0.5 is here

blog.jetbrains.com

31–40 of 111 posts

Re: Kotlin 1.0.5 is here

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

Worth noting that Kotlin's support for compile-time inlining can help reliably eliminate object allocations that otherwise you'd rely on the JITC to eliminate. So that can help.

Re: Kotlin 1.0.5 is here

#32
post #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.

What's unclean about for loops?

Re: Kotlin 1.0.5 is here

#33
post #18

Is there anybody switching from Scala to Kotlin?

After having so much fun with Kotlin, I tried switching to Scala and quickly switched back. Scala seems too complicated, with a steep learning curve. Implicits all over the place made it hard to read code and understand what was going on. I do like many of the more powerful features that Scala has, but Kotlin strikes a right balance of simplicity and power in my opinion.

As a really big Scala fan, I can say Kotlin is probably the right choice when it comes to doing Android development.

That being said, yes Scala has a steeper learning curve than say, Kotlin or Go. But if you're going to devote the I don't know, next ten years of your life to working in a particular language, does it really matter if it takes two months vs. four months to ramp up?

Re: Kotlin 1.0.5 is here

#34

Earlier quoted context omitted.

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.

I've built a couple Vert.x apps in Kotlin and honestly I can't even think what first class Kotlin support would add. Vert.x already feels like a perfect match to Kotlin.

Re: Kotlin 1.0.5 is here

#35

Earlier quoted context omitted.

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.

vertx looks very slow compare to other java frameworks. And the fact that you can use them and you will the same speed asta java... https://www.techempower.com/benchmarks/#section=data-r12&hw=...

Hard to say what's going on there. Vert.x itself is quite speedy. The DB access module they use (http://vertx.io/docs/vertx-mysql-postgresql-client/java/) is still in technical preview so there may be legitimate issue with the module or something wrong being done (I only glanced quickly and didn't see anything immediately obvious). Vert.x really isn't much more than a pleasant facade over Netty so it's hard to imagine what's actually wrong.

It appears there may be an issue with the benchmark? https://github.com/TechEmpower/FrameworkBenchmarks/issues/21...

Personally, I don't really care about benchmarks. Getting stuff done is more important at this stage. Eventually this may become more important but I'm not going to worry about it until it becomes and issue for us specifically.

Re: Kotlin 1.0.5 is here

#36
post #16

Earlier quoted context omitted.

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

What's unclean about for loops?

Mutating index state variables, and it's not functional (you can't pass a function to be the inner loop)

Re: Kotlin 1.0.5 is here

#37
post #18

Is there anybody switching from Scala to Kotlin?

If they're using it for Android development they should. Kotlin has just about first class support for it, while Scala is a pain to get working.

Also, the latest version of Scala doesn't work on Android since it requires Java 8.

Re: Kotlin 1.0.5 is here

#38
post #28

I'm torn on this. On one hand, Kotlin is great. It's not Scala but it gives you a whole lot while maintaining the ability to very easily swap in for Java. On the other hand, it's controlled by Jetbrains—the company that now offers a "yearly license" of many of its compilers at the same price point it once sold them for, after which time they forcibly downgrade the software their users have paid for. It's not illegal…

I don't really get that. Kotlin is open source. You can write and compile Kotlin code without paying JetBrains a penny, it's not hard. There's even an Eclipse plugin - written by JetBrains. I'm not sure what more is required to make it truly open.

What non-Jetbrains IDE supports Kotlin well? What % of its contributions come from outside the Jetbrains ecosystem?

Once Jetbrains no longer controls Kotlin's future and most Kotlin users are not Jetbrains customers, then I'd consider it truly open.

Re: Kotlin 1.0.5 is here

#39
post #28

I'm torn on this. On one hand, Kotlin is great. It's not Scala but it gives you a whole lot while maintaining the ability to very easily swap in for Java. On the other hand, it's controlled by Jetbrains—the company that now offers a "yearly license" of many of its compilers at the same price point it once sold them for, after which time they forcibly downgrade the software their users have paid for. It's not illegal…

Er, you're eschewing Kotlin despite it's being open source because of your perception that it's controlled by a corporate entity, but in the same post you want it supported in another open source product (VS Code) backed by another corporate entity (Microsoft)?
Post reply on HN