tags:

views:

243

answers:

5

Why C# is an open standard but .NET is not? What is the point in this? Why Microsoft decide to open only some part of their .NET?

+5  A: 

.NET is the runtime and C# is the language. C# can be compiled and run on other runtimes, such as Mono. I am actually not aware of any other runtimes besides Mono, but since the spec for C# is open, you could read it and make your own runtime. ;)

FrustratedWithFormsDesigner
You could also not employ a runtime at all. There's nothing stopping you from statically compiling C#.
Adam Robinson
DotGNU is also one...http://www.gnu.org/software/dotgnu/
Lucero
There's also Rotor, a shared source implementation of the CLR.
Daniel Goldberg
Daniel Earwicker
@Lucero: I'd never heard of DotGNU before. How compatible is it with WinForms? I have some C# projects that if I could compile them for Linux with *minimal* code changes, it would be nice. I remember trying something like it with SharpDevelop/Mono and too many things broke.
FrustratedWithFormsDesigner
@Frustrated: If you take a WinForms project and can compile it for another platform with minimal changes, all you'll end up with is a crappy cross-platform application.
Adam Robinson
@Adam Robinson: I'd proabably be willing to live with a crappy cross-platform app if it's not *too* crappy. It's a personal project used > 90% of the time by myself, and having a linux version would be a nice little convenience, even if the UI is not quite the same. Really, I'm just too lazy to rebuild my UI from scratch with a different framework. :P
FrustratedWithFormsDesigner
@Frustrated: the DotGNU is much less mature than Mono and more focused towards web services and applications. Maybe you should give Mono another try, they are making significant progress in many areas, WinForms included.
Lucero
+7  A: 

Various parts of the .NET runtime are indeed standardised by ECMA just like C# - CIL, the CLI, the CLS.

Daniel Earwicker
+3  A: 

C#, like Java, C, C++, etc. is just a language definition. In and of itself, it does nothing. It defines the means by which a user can define a program or procedure and interface with external libraries.

The .NET framework, on the other hand, is not a language. It's a class library and development framework.

Adam Robinson
+2  A: 

Actually, there is an open standard (ECMA 335 for the runtime api instead of ECMA 334 for the language).

Going beyond this, the source code for Microsoft's implementation of .Net is available and there are multiple separate implementations (the most prominent of which by far is mono).

There is some additional concern about patent encumbrance. However, Microsoft has also issued a legally binding and irrevocable community promise on the .Net platform that covers both specifications (a lot of people miss the legally binding part).

Joel Coehoorn
Note only a subset of the .NET library sources are available. Furthermore, the source code to the CLR is not/probably will never be released - Microsoft released a "reference implementation" but not the real one.
RichAmberale
+1  A: 

I assume you mean the framework. I guess they want to maintain control over the library implementation on Windows. There is nothing stopping someone from implementing a call-compatible version of all or part of the framework based on their own source as was done by Mono.

Tom Cabanski
Also many pieces of the .NET Framework is only meaningful on Windows, but a good open standard should be platform independent.
Lex Li