Hacker News new | ask | show | jobs
by carsongross 4431 days ago
I'll say it again:

If java was brainf&%k and we still got the JVM out of it, it would all be worth it. And I think there's a good chance that Java's successor runs on it.

1 comments

Totally agree that the JVM is super powerful. I think it's Java's greatest strength. However, I don't see any current JVM language as a potential replacement. Scala is too complex. Clojure, while wonderful, is Lisp and no one has been able to make that popular for 5 decades (not even pg).
I'm looking a lot at Kotlin. It's not mature yet: JetBrains will start using it this summer for their own projects and I expect it to firm up a lot then.

The nice thing about Kotlin is almost perfect compatibility with Java, and an auto-translator that doesn't suck. So you can take an existing Java codebase and auto translate class by class, maintaining compilability the whole time. Also the standard library is mostly a set of extensions to the JDK so your existing library knowledge ports across, except you keep finding useful goodies sprinkled all over the place.

Feature-wise Kotlin has things that I feel would help me write fewer bugs: it has null-safety encoded into the type system, smart casts, extension methods, some good functional programming support, powerful properties and so on. There are features it lacks too, but I hope JetBrains will continue to push it forward for many years.

They already use it. There was a Kotlin talk where they mentioned some plugins are now being written in it.
Oh, no worries, I fixed that for you:

http://gosu-lang.github.io/

;)

That looks amazingly similar to Haxe, which is not tied to the JVM but can compile to optimized Java.

http://haxe.org

Wow, that is cool. How is the runtime performance?
Not terrible, depending on what you are doing: it compiles down to the obvious bytecode for most statements/expressions.

If you start using the open type system, you end up going through some somewhat slow reflective code to make everything work, and that can be slower.

The biggest problems with Gosu right now are:

- Startup time - Tools support

We are working on both of those and hope to have better tools out over the summer.

What about Groovy?
Good question. All I know is that it's used for Gradle and Grails. Some people I know view it more as a scripting language...
Groovy doesn't have much significant use anymore. Someone's gaming the stats to make it look more popular, though. At https://bintray.com/groovy/maven/groovy/view/statistics you'll see 190k downloads in the last 30 days, click on country and you'll see 162k of them from a proxy server in China, and only 8300 direct from the US.