Sun 是使用 JVM 的 .NET 的竞争对手

发布于 2024-07-10 20:03:55 字数 284 浏览 8 评论 0原文

近年来出现了许多 JVM 语言,包括 Javascript、Python、Ruby 等(完整列表在这里: JVM 语言列表)。 我的问题是:为什么Sun没有像微软的.NET那样为JVM推出一整套语言? 借助新版本的 JVM,他们可以对动态语言或类型系统进行任何必要的调整,并发布至少适用于几种语言的编译器。 这将立即允许一大堆语言访问 Java 已经存在的大型类库。

There have been many JVM languages in the recent few years including Javascript, Python, Ruby etc. (full list here: List of JVM Languages). My question is this: why has Sun not come out with a full suite of languages for the JVM just like Microsoft's .NET? With the new version of the JVM, they can make any necessary adjustments for dynamic languages or the type system and release a compiler for at least a few languages. This would immediately give access to Java's already existing large class library to a whole bunch of languages.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

南城追梦 2024-07-17 20:03:55

Sun(现在的 Oracle)本身并不需要做太多事情来创建更多 JVM 语言 - 因为这个角色很大程度上已由开源社区和/或更广泛的 Java 生态系统承担。

考虑:

  • 现代、日益流行的开源 JVM 语言,例如 ScalaGroovyClojure
  • 由组织创建或赞助的库就像 Apache Software Foundation 一样,所有 JVM 语言 IDE/开发工具都可以使用
  • Eclipse Foundation
  • Java 主要支持者公司创建的各种工具和企业产品,包括 IBM、Red Hat、Google 等...
  • 通过 OpenJDK 项目 将 Java 语言和平台本身作为开源产品进行开发

因此,将 Java 视为更合适作为一个拥有许多参与者的开放生态系统,而不是由单个公司控制的平台。

Sun (now Oracle) doesn't really need to do much itself to create more JVM languages - since this role has largely been taken up by the open source community and/or the wider Java ecosystem.

Consider:

  • Modern, increasingly popular open-source JVM languages like Scala, Groovy and Clojure
  • Libraries created or sponsored by organisations like the Apache Software Foundation that can be used by all JVM langauges
  • IDEs / development tools by the Eclipse Foundation and others
  • Various tools and enterprise products created by the major corporate backers of Java, including IBM, Red Hat, Google etc...
  • Development of Java language and platform itself as an open source product through the OpenJDK project

It's therefore more appropriate to think of Java as an open ecosystem with many participants, rather than a platform controlled by a single company.

丿*梦醉红颜 2024-07-17 20:03:55

财务数据说明了一切:


MSFT - 市值 173B,净利润 17B


JAVA - 市值 2B,净利润 4 亿

The financials say it all:


MSFT - Market cap of 173B, Net income of 17B


JAVA - Market cap of 2B, Net income of 400M

等待圉鍢 2024-07-17 20:03:55

我看到两个问题:Sun 是否会更改 JVM 以支持动态语言(这会很巧妙,尽管某些动态语言已经能够在当前 VM 上运行,但可能会以性能为代价); 以及为什么 Sun 没有正式开发其他语言。

我希望他们会做第一个,但我认为没有必要做第二个。 斯科特的回答非常好。 此外,Java 已经存在相当长一段时间了,而 Microsoft 必须启动他们的 CLR/.NET 平台,因此他们需要尽最大努力说服开发人员......而且他们负担得起!

所以我不确定Sun是否需要为JVM推出替代语言,独立开发人员有足够的精力在没有帮助的情况下做到这一点。

此外,JavaFX 脚本语言也可以被视为这样的语言(即 JVM 的官方语言),并且 BeanShell 似乎可能会在 JSR 中采用。

I see two questions: will Sun change the JVM to support dynamic languages (that would be neat, although some dynamic languages managed to work already on the current VM, perhaps at the cost of performance); and why Sun doesn't officially develop other languages.

I hope they will do the first, but I don't see the need for the second. Scott's answer is quite good. Beside, Java is here for quite some time already, while Microsoft had to jump start their CLR/.NET platform, hence they needed to give the maximum to convince developers... and they can afford it!

So I am not sure Sun needs to push alternative languages for the JVM, the independent developers are vigorous enough to do it without help.

Beside, JavaFX scripting language can be seen as such (ie. official language for JVM) and it seems that BeanShell might be adopted in a JSR.

总以为 2024-07-17 20:03:55

如果您正在寻找 Visual Basic for the JVM,恐怕该项目是已被取消:-)

说真的,在专注于 Java 语言多年之后,Sun 现在直接支持 Jython 和 JRuby 背后的开发人员,并且正在更改 JVM 及其 IDE 以更好地支持这些语言。 Java 6 现在还包括 Rhino JavaScript 运行时。

您说得对,这些语言不是 Sun 从头开始​​开发的,我认为这是一件好事。 Java 生态系统在社区以及许多其他依赖 Java 的公司(如 IBM 和 Oracle)中有着悠久的创新历史。

我真的不明白 Sun 会通过创建全新的语言来支持来解决哪个问题。 我什至不确定 JavaFX 是否最好采用全新的语言。 我理解为什么 MS 必须支持 .NET 上的 Visual Basic,但幸运的是 Sun 不必这样做。

If you're looking for Visual Basic for the JVM, I'm afraid that project's been cancelled :-)

Seriously, after many years of focusing on just the Java language, Sun now directly supports the developers behind both Jython and JRuby, and is changing the JVM and their IDE to better support these languages. Java 6 also includes the Rhino JavaScript runtime now.

You're correct that these are not languages that Sun developed from scratch, and I think that's a good thing. The Java ecosystem has a long history of innovation happening in the community, and at a lot of other companies that depend on Java, like IBM and Oracle.

I don't really see which problem Sun would be solving by creating brand new languages to support. I'm not even sure JavaFX is best served by having a completely new language. I understand why MS had to support Visual Basic on .NET, but thankfully Sun doesn't have to do that.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文