Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a programming language be part of a platform? (C# and Java related)

Tags:

java

c#

.net

He's the deal: I'm making some theorical research on .NET and Java platforms for my graduation course and I reached a cloudy area: Can C# be considered part of the .NET Framework? Analog to this, is Java (the programming language) considered part of the Java platform?

Let me review the facts:

  1. .NET is a development platform specified by the ECMA-335 Standard; it is an implementation of this standard, if you will. C# however, is an implementation of another standard, ECMA-334 which states clearly that its implementation does not require an implementation of the ECMA-335 standard - the CLR in Microsoft's case (which a lot of people mistakenly call .NET when there's a lot more to it than just the CLR).

  2. Also, we have Mono, a different implementation of the ECMA-335, on which C# also runs (from everything I read, it is implied that Novell doesn't have a ECMA-334 implementation of its own, which is perfectly reasonable), but C# is not PART of Mono.

  3. There's the fact that I read somewhere that a programming language is not part of a platform, but unfortunatelly I can't seem to find the source.

  4. There's also the fact that Wikipedia "Computing Platform" article states that a programming language is a platform; Wiki is, however, virtually worthless if you want your research to be taken seriously.

  5. Microsoft seems to promote C# as a part of .NET, but being .NET a multi-language platform, wouldn't be so every language that supports/is supported by it?

So far, I only spoke of .NET, but I also need an answer regarding Java. Actually, a general response would be the best.

So, can anyone help me to put the pieces together? Reference material is much appreciated.


On a different issue, I've found A LOT of books out there that explain the inner workings of the CLR, isn't anything on the same lines for the JVM? I mean, there's the Specification, of course, but I was aiming for something easier to digest, I'm not planning to build a Java compiler after all..

like image 913
S.O. Avatar asked Aug 31 '10 18:08

S.O.


2 Answers

As everybody seems to notice, it depends on your definitions.

But Ecma 334 (and/or some other Ecma doc) also specify MSIL (or CIL), and that definitely is part of the platform.

And I think C# is not part of the platform, the MS compiler just targets the CLR by outputting MSIL. it's not so hard to imagine an implementation for another platform, managed or unmanaged.

Java confuses the issue a little by having both a platform and a language called Java but it's not so hard to see the distinction.

So, can a language be part of a Platform? Yes, see MSIL.
But most languages (including C# and Java) are not.

A lot of languages (C, C++) make an active effort to be portable across platforms.

like image 82
Henk Holterman Avatar answered Sep 29 '22 18:09

Henk Holterman


Are you asking in general? If so then it would seem to me that surely the answer is yes, a programming language can be part of a platform. For instance, the ECMA-335 standard includes a specification of the CIL programming language. It could have pointed to the C# language as well and referenced the ECMA-334 standard. It just doesn't.

This is really a question of loose vs. tight coupling applied on a broad scale. Loose is generally preferred as a design choice. Tight is nonetheless always an option.


Thinking about the question a bit more, I think I understand better what you are uncertain about. There's the CLI, specified by ECMA-335, and then there's .NET, which is obviously tied to Microsoft.

The CLI does not include C#; on that much I think we can agree. Does .NET?

Honestly, I'm not really sure. Considering .NET is a product maintained by Microsoft, I suppose it's really up to them whether C#, VB.NET, F#, etc. are or are not a "part of" .NET. Same goes for Sun with Java and the "Java platform."

like image 21
Dan Tao Avatar answered Sep 29 '22 18:09

Dan Tao