Question

JVM provides great performance - it's on the one hand. Golang sounds like a new paradigm and extremely productive - on the other hand. If we could bring together the best of two worlds - JVM performance and golang productivity - we could get a lot of benefits. Does anyone know any project that provides golang implementation in java?

Was it helpful?

Solution

A quick search came up with

http://code.google.com/p/jgo/

This link suggest it's the main or only effort.

http://en.wikipedia.org/wiki/List_of_JVM_languages

OTHER TIPS

It may be difficult to make a good JVM implementation of Go. Rob Pike, who is one of Go's creators, spoke about this on episode 0.0.3 of the Changelog podcast:

[timecode 17:05] For instance, it is quite difficult to implement Go's interface model using a JVM: you might have to add a bytecode to deal with some of the type stuff. So for some of these existing systems [(JVM and CLR)] it's not quite obvious how Go would run with them […]

You should check JGO website: http://jgo.herokuapp.com/

And the JGO Docs: http://jgo.herokuapp.com/api/

A different route might be to use a JVM library which provides the most important features of Go, which are in my opinion and experience the lightweight Go-routines multiplexed on JVM threads, and channels for communication and synchronization.

There is one such library, Quasar, from Parallel Universe (see e.g. this blog post comparing Quasar and Go). Also, it works well with Kotlin, which is getting more popular now as an officially supported Android language, and providing much more compact (productive?) syntax than Java.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top