TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Are there any Swift compilers for JVM?

5 点作者 zerolinesofcode超过 10 年前
Swift- the new programming language from Apple shares a lot with Groovy, a JVM language.<p>Are there any ongoing work to use Swift to write code that run in a JVM?

3 条评论

vorg超过 10 年前
&gt; Swift- the new programming language from Apple shares a lot with Groovy, a JVM language<p>I dispute this claim. According to the top comment at &quot;Swift is a lot like Scala&quot; <a href="https://news.ycombinator.com/item?id=8218578" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8218578</a> which was submitted an hour before yours here: &quot;Scala, modern C#, Kotlin, Xtend, Nemerle, Ceylon, Dart and Swift have a lot in common. They&#x27;re all compiled languages with pretty high performance characteristics.&quot;<p>Most of those are JVM languages (Scala, Kotlin, Xtend, Nemerle, Ceylon) which Swift shares a lot with, but Groovy less so I&#x27;d say.
dozzie超过 10 年前
Why? What&#x27;s Swift good for when stripped of Cocoa? (The same applies to Objective-C, except that it has GNUstep.) There are plenty of languages on top of JVM. Why Swift should be considered better from any of them?
评论 #8219883 未加载
argonaut超过 10 年前
As a side note, if you want cross-platform (Android&#x2F;iOS) code, your options include C&#x2F;Objective-C&#x2F;C++ (directly compiled for iOS, and used in Android via JNI) and JavaScript (either a native JS engine or a webview).