为什么不是Sun做一个C#为Java字节code编译器? [英] Why doesn't Sun do a C# to Java byte code compiler?

查看:135
本文介绍了为什么不是Sun做一个C#为Java字节code编译器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我公司拥有大型的C#code基地。超过一半的code是我们的核心引擎,用于创建,读取,修改,计算和写入Excel工作簿。我们经常得到来自客户和潜在客户询问我们是否要建立一个Java版本的我们的引擎问题 - 其中许多人是不是在所有感兴趣的用户界面。我们甚至有谁已经采取措施来使用我们的.NET库从他们的Java应用程序故障的几个客户。

My company has a large C# code base. Well over half of this code is our core engine for creating, reading, modifying, calculating and writing Excel workbooks. We frequently get questions from customers and potential customers asking whether we are going to build a Java version of our engine - many of them are not at all interested in the UI. We even have a few customers who have taken the trouble to use our .NET library from their Java applications.

所以,我们想打造我们的核心引擎的Java版本,最好不维护一个单独的Java源代码code碱基。

So, we would like to build a Java version of our core engine, ideally without maintaining a separate Java source code base.

埃里克库说明这个问题的非常好。我在不同的是,我们的软件许可证包括版税免费部署,使得Eric的选择有Mainsoft的不可取对我们来说其实是一个类似的立场。

Eric Sink described this problem very well. I am in a similar position except for the fact that our software license includes royalty free deployment, making Eric's choice of Mainsoft a nonstarter for us.

我一直在谷歌搜索中的C#来JVM每隔几个月,好几年了,没有喜悦。在花了〜7个时间开发的Java类似的软件,我相信,我们在我们的核心引擎使用.NET的API可以很容易地进行封装,我们可以完成我们需要使用Java库的一切。所以,如果我们只有一个C# - > JVM编译器我们可以构建我们的核心引擎的Java,我们就再也不用转身离开Java开发,谁愿意使用它

I have been Googling the likes of "c# to jvm" every few months for several years now with no joy. Having spent ~7 years developing similar software for Java, I am confident that the .NET APIs we use in our core engine could easily be encapsulated and we could accomplish everything we need using the Java libraries. So, if we only had a C# -> JVM compiler we could build our core engine for Java and we would no longer have to turn away Java developers who would like to use it.

我不要求为技术原因,太阳不会做一个C#编译器。我认识到,Java有没有属性或无符号的64位长,等等...对于参数的缘故,只是假设所有这些技术问题可以通过扩展JVM和/或其他手段来解决。

I am not asking for the technical reasons why Sun does not do a C# compiler. I recognize that Java has no properties or an unsigned 64 bit long, etc... For the sake of argument, just assume that all of these technical issues could be dealt with by extending the JVM and / or other means.

和我不要求尚未对为什么一种语言/堆栈可能比其他更好的另一次辩论。在我们的业务现实情况是,有很多使用每个潜在客户。

And I am not asking for yet another debate on why one language / stack might be better than the other. The reality in our business is that there are plenty of potential customers using each.

使其更容易在Java平台上运行C#code意味着更多的开发者和平台更多的软件。有没有什么更重要的是一个平台的成功? 乔纳森是一个软件的家伙。我会留给其他人比我聪明,以决定他是否承担了一个不可能完成的工作为太阳的president兼首席执行官,但已符合与乔纳森后不久,他加入Sun我的即时通讯pression的是,他能理解软件,以及需要开发一大基

Making it easier to run C# code on the Java platform means more developers and more software for the platform. Is there anything more important to the success of a platform? Jonathan Schwartz is a software guy. I will leave it to others smarter than me to decide whether or not he took on an impossible job as President and CEO of Sun, but having met with Jonathan shortly after he joined Sun my impression is that he understands software and the need for a large base of developers.

  1. NIH 综合症?
  2. 麦克尼利的鬼的?
  3. 有太多的Java开发人员不喜欢或不信任任何有关微软?
  4. 在他们同意不作为采取一掷千金的?
  5. ???
  1. NIH syndrome?
  2. The ghost of Scott McNealy?
  3. Too many Java developers dislike or distrust anything related to Microsoft?
  4. They agreed not to as part of taking the big bucks?
  5. ???

必须有一个很好的理由。我不能为我的生活弄清楚它是什么......

There must be a good reason. I just cannot for the life of me figure out what it is...

推荐答案

首先Sun公司零的激励来实现一个C#编译器在JVM上,因为他们有非常类似的东西叫做Java编程语言。

Firstly Sun has zero incentive to implement a C# compiler on the JVM because they have something very similar called the Java programming language.

它也没有真正简单,只是实现一个编译器Java标准类库是不一样的.NET基础类库。你会最终不得不改变所有的.NET API调用Java API调用。

Its also not really as simple as just implementing a compiler as the Java standard class libraries are not the same as the .net Base Class Libraries. You would end up having to change all the .NET API calls to Java API calls.

Micrsoft有一个名为J#这本来是对Java到.NET的转换,但最终没有人使用它作为API仅限于pre的Java 2 API,因此它主要是无用的产品。那将是如果Sun实施.NET BCL的部件是相同的,因为它仅芯部是标准化和版权自由。像ASP.NET和WPF,WCF等部件不属于ECMA标准的一部分,因此太阳将需要微软的权限来执行这些API的。

Micrsoft had a product called J# which was meant to be for Java to .NET conversion but in the end no one used it as the API was limited to pre Java 2 API so it was mostly useless. It would be the same if Sun implemented parts of the .NET BCL, as only the core portions of it are standardised and royalty free. Parts like ASP.NET and WPF, WCF etc are not part of the ECMA standards and so Sun would need Microsofts permission to implement those API's.

如果足够的客户希望有一个Java版本,使商业意识,你的程序移植到Java再去做,你就永远不会得到来自Sun的帮助通过C#JVM的编译器。

If enough customers want a java version to make business sense to port your application to java then do it, you just wont ever get any help from Sun via a C# to JVM compiler.

这篇关于为什么不是Sun做一个C#为Java字节code编译器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆