Live data from Hacker News

Kotlin 1.0.5 is here

blog.jetbrains.com

51–60 of 111 posts

Re: Kotlin 1.0.5 is here

#51

Anyone using Kotlin to compile to javscript in a large app care to share some experiences?

I have found Kotlin and Dart similar in many aspects, with the major difference that Kotlin is much better if you have a ton of Java libraries that you want to use along your code, while Dart is much better if you want to do frontend development. I'd suggest to check it out if your primary focus is compiling to javascript.

Re: Kotlin 1.0.5 is here

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

And I'm happy to pay for their 'yearly license'. Great companies should have great revenues. I don't want them to end up like FoundationDB or RethinkDB. The fact that they get steady revenue ensures me that they won't perish and will keep doing great job.

Re: Kotlin 1.0.5 is here

#53
post #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. :(

Not everyone needs a functional language.

Re: Kotlin 1.0.5 is here

#54
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?

For loops require explicit and error-prone use of integer indices and are of limited utility outside arrays. Foreach loops in Java/C# are an attempt to generalise, but they are really just syntactic sugar over external iterators. They give privileged status to the specific iteration interface chosen, entangling the language and its libraries. The actual Iterator interface chosen by Java has proven to be unsuitable for coroutines/yield, but is now too difficult to change. In Haskell, foreach loops can be implemented purely as a higher-order library function.

Re: Kotlin 1.0.5 is here

#56
I can also vouch for Kotlin. I am actually not an Android dev and I started using Kotlin for a backend project (uses Spring Boot) and I was pleasantly surprised how easy my switch to Kotlin was.

Re: Kotlin 1.0.5 is here

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

A bit of a late response as I just noticed your comment "I'm considering avoiding the JVM for games."

I have found myself in this boat many times. I have coded games in Purebasic, TI-83/89 Basic, Z80, C/C++, Java, Kotlin, Javascript, Haskell, Swift, etc. If you are an indie/hobby developer, don't worry about the language too much. Just do it in what's comfortable and enjoy the process. That alone will increase the odds of you completing the game by 50% (random number).

Re: Kotlin 1.0.5 is here

#58
post #42

Earlier quoted context omitted.

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)?

>" Er... " VS Code is miles ahead of Jetbrains offerings and has no yearly subscription fee. MS was indeed one of my least favorite companies half a lifetime ago, but they've changed business models and are now pursuing a growth strategy (particularly wrt services) and have abandoned the fight to capture consumer surplus at all costs.

> VS Code is miles ahead

How so? It's very busy adding features JB IDEs had 10 years ago (CSS autocompletion in HTML, wow), it's not aiming to be a lightweight IDE at all, and it's written in JS. It will collapse under its own weight in a couple of years. Sure, today it might be at a stage where they have sort of enough functionality to appear competent while being sort of snappy, but at this rate it's only gonna get worse. It's a new player on a market that doesn't see new players very often, it's interesting to watch, but miles ahead?

Re: Kotlin 1.0.5 is here

#59
It also finally solves the Android Studio bug that would show all the Databinding code as erroneous in the IDE.

The tooling is still a bit rough around the edge compared to the base Android one, mostly because the android tools team really does an awesome job.

It is still useable though, and the language is so much better than java that it is a breeze to use.

The only downside is that you have to interface it with java code, which brings a couple of issues.

Post reply on HN