Running Go on the JVM...

xuanbao · · 1392 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Anyone tried abusing GopherJS and DynJS to run Go on the JVM? :P</p> <hr/>**评论:**<br/><br/>boomshroom: <pre><p>Actually yes. It took a little modification, but I was successful at loading GopherJS code in Nashorn as a Sponge plugin. (Sponge is a plugin api for Minecraft to replace bukkit)</p></pre>lapingvino: <pre><p>Cool :) maybe a way to get all those new programmers because of Minecraft to Go instead of Java :P</p></pre>kosokun: <pre><p>I have not yet seen this horror movie</p></pre>ewanvalentine: <pre><p>What would be the purpose? Surely Go&#39;s more performant and portable than anything on the JVM already? </p></pre>Effetto: <pre><p>Interoperability ? </p></pre>BoTuLoX: <pre><p>...with?</p></pre>Effetto: <pre><p>15 years or so of stunning open sources libraries and legacy code ?</p></pre>bmurphy1976: <pre><p>I like Go specifically because it is 180 degrees opposite direction from the JVM and JVM languages. If you want to write code for the JVM there are plenty of options available that are better than Java. Why torture yourself this way?</p></pre>BoTuLoX: <pre><p>I&#39;d love to say &#34;as long as it&#39;s a last resource situation for compatibility purposes&#34; but part of the <em>raison d&#39;etre</em> of Go is to avoid this kind of crap from being abused everywhere by people who should know better, so given the sub, I&#39;m just gonna go with <a href="http://shamenun.com/" rel="nofollow">this</a>.</p></pre>lapingvino: <pre><p>That&#39;s why I said abuse ;) but yeah, for example using Go instead of Java for Android apps without need to go full native ;)</p></pre>bmurphy1976: <pre><p>Sounds like a bad idea to me. Just use Scala, Clojure, Kotlin, or any other of the multitude of languages that are compatible with Java. Go is great because it&#39;s light and fluffy and NOT a JVM language. Trying to run it on the JVM pretty much destroys most of what is good about Go.</p></pre>kkdai: <pre><p>why not use gomobile in Android? it will generate aar for your android project <a href="https://github.com/golang/go/wiki/Mobile" rel="nofollow">https://github.com/golang/go/wiki/Mobile</a></p></pre>storm14k: <pre><p>This only allows you to write the app backend. It doesn&#39;t allow you to tie into the native UI. Not sure if you get access to sensors etc. either.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

1392 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传