Google Go for Java platform?

huangapple go评论87阅读模式
英文:

Google Go for Java platform?

问题

JVM提供了出色的性能 - 这是一方面。Golang听起来像是一种新的范式,非常高效 - 另一方面。如果我们能够将两个世界的优点结合起来 - JVM的性能和golang的高效性 - 我们可以获得很多好处。有人知道有任何在Java中提供golang实现的项目吗?

英文:

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?

答案1

得分: 7

一个快速搜索得到了

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

这个链接表明这是主要或唯一的努力。

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

英文:

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

答案2

得分: 6

可能很难实现一个好的Go的JVM实现。Go的创造者之一Rob Pike在the Changelog podcast的第0.0.3集中谈到了这个问题:

[时间码 17:05] 例如,使用JVM实现Go的接口模型是相当困难的:你可能需要添加一个字节码来处理一些类型相关的事情。所以对于一些现有的系统(JVM和CLR),Go如何与它们一起运行并不是很明显。

英文:

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 […]

答案3

得分: 1

你应该查看JGO网站:
http://jgo.herokuapp.com/

还有JGO文档:http://jgo.herokuapp.com/api/

英文:

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

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

答案4

得分: 0

另一种方法是使用一个JVM库,该库提供了Go的最重要的特性,即我认为和经验丰富的轻量级Go协程在JVM线程上复用,并且用于通信和同步的通道。

有一个这样的库,Quasar,来自Parallel Universe(例如,参见这篇博客文章比较Quasar和Go)。此外,它与Kotlin很好地配合使用,Kotlin现在作为官方支持的Android语言越来越受欢迎,并且提供比Java更紧凑(更高效?)的语法。

英文:

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.

huangapple
  • 本文由 发表于 2012年8月9日 19:45:20
  • 转载请务必保留本文链接:https://go.coder-hub.com/11882706.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定