可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
What are the main benefits of using Mono over Java (or any other "free" or Linux-friendly language/runtime)?
Mono will always trail behind the latest developments in the .NET framework, why would you want to use Mono over another traditional open-source language/framework (Java)?
EDIT:
Like someone mentioned below, I guess the root question is, why would you want to use .NET on the Linux platform?
回答1:
The answer is pretty obvious: because you want to use .Net on Linux.
This of course begs the question (which I think is really what you're getting at): why would you want to use .Net on Linux (over Java)?
Lots of reasons:
- Common code between your server and, say, a WPF or Winforms app;
- Use of a particular .Net language, like F#;
- Language features that aren't in Java (closures, operator overloading, partial classes, runtime generics, indexers, delegates, LINQ, var types, etc etc etc);
- Your skills or those of your team are already in C#;
- etc.
回答2:
Personally, i have more trust in Linux platform as server, but want to use C# as program language.
回答3:
You want to use C# on the iPhone, Wii, and possibly Android at some future point. See this link.
http://arstechnica.com/open-source/news/2009/01/open-source-mono-framework-brings-c-to-iphone-and-wii.ars
回答4:
Some people like C# better than Java. Also, consider that C# is an ISO standard language while Java is not. Maybe you want to run ASP.NET code on a Linux server? There's lots of reasons, really.
回答5:
I think it comes down to personal preference. I am comfortable with c#, and I want to develop apps that I can run on my Ubuntu Laptop or my Vista Laptop. Therefore, I use mono. If I were more comfortable with Java, then that's probably what I'd use.
Just my 2 cents.
回答6:
I worked for a company once whose main product was written in ASP.NET. They realized that they could probably increase their market share if they could make their product run on Linux servers. This would of course be quite difficult if not for Mono. I was given the task of spending some time seeing how much (if any) of their code would run under Mono. This would have been about 2 years ago - most of it compiled, but Mono's support for generics at the time left a little to be desired. I think its matured since then, but some of the code wouldn't even parse. The code also made use of p/invoke a bit to call native code, so that made things a little bit interesting as well. It certainly was fun trying to get it running, though.
回答7:
Since Microsoft submits changes to the C# ISO standard before they make them, in theory Mono doesn't NEED to trail .NET. In reality, the big old MS budget gets to the finish line first.
回答8:
Mono is behind on some things, but way ahead on others. For example, Mono supports SSE and full ahead of time compilation - built in. On the other hand... it's going to take Mono sometime to implement all the new upcoming stuff in the upcoming .net release... for example... the quite extensive parallel libraries.
回答9:
As everybody says, "to run C# on Linux" or "to be cross-platform" or whatever.
The reason why I am interested in Mono -- and I haven't been convinced to touch it, yet -- is the possibility to take advantage of all the things that .Net has to offer that Java does not. Basically your question does come down to a Java vs. .Net comparison, and I'm not going to start running through a million points of comparison between them (in Google you'll find scores of comparisons of J2EE vs. ASP.NET, which is one part, and Java vs. C#, which is another).
But what is the big difference between .Net and Java? It has to do with the monolithic force behind .Net (Microsoft, and Novell is trying to translate that to other platforms) or the multi-vendor approach of Java. Just the process of choosing an App Server might be enough for some people to choose Mono.
What does one big monolithic vendor like Microsoft give you that Java seems to not have:
- Centralized documentation (was "Amazingly good documentation, all in one place" but several people have told me I'm wrong)
- No need to make individual platform choices (e.g., ASP.NET or ASP.NET, not servlets+JSP+JSTL?+Axis)
- Other stuff I am forgetting
And then there are the other massive differences: Java is a single language and Mono (I think) can run CLR-compiled code from a variety of languages.
回答10:
in one word? Cross-platform
回答11:
Anyone who uses Mono faces software patent danger from Microsoft.
That's why not only Mono should be avoided for new applications but also C# in first place.
Migrating to Mono only make sense if you already stuck with Windows and want to escape.
Why free software shouldn't depend on Mono or C#
回答12:
How come noone has mentioned that Linux is free?
回答13:
I have used mono as a cross-compiler, in effect. I added some "exec" lines to an existing java/ant build file to call mono as the compiler, so there was a single, complete, command line build process.
I had to write a C# wrapper layer around some PC code which our java-on-linux code base had to use, but I couldn't bring myself to require starting up Visual Studio (on a seperate computer) just to do the check-out and build process.