A recent answer to a question on converting Java to C# suggested I should use Java Language Conversion Assistant and pointed to:
http://msdn.microsoft.com/en-us/library/7tatw8a2%28VS.80%29.aspx
I cannot find JLCA on my Visual Studio (9.0.30729.1) and on looking at Wikipedia (http://en.wikipedia.org/wiki/J_Sharp) I find:
Retirement of the J# language and Java
Language Conversion Assistant from
future versions of Visual Studio,
since the existing J# feature set
largely meets customer needs and usage
of J# is declining. The last version
shipping with Visual Studio 2005 will
be supported until 2015 as per the
product life-cycle strategy.
I'd be grateful for an overview of whether I can use and should be using either J# or JLCA and if so how to install and use them.
Something that might help - there is an open source project IKVM.Net that can recompile your java bytecode into .net byte code. Afterwards, you could use Reflector to decompile the generated .net assembly into C# for additional modifications. IKVM comes with a fully converted java class library as .net assembly, which you can continue using from that code, while slowly moving to the core .net libraries.
From this and other answers it seems that J# should be deprecated.
Related
Anyone could help my why in MSDN some resources for C# are provided the list of versions (for a specific topic) as C# (1.0, 2.0, etc) and some other are provided as Visual Studio versions (2003, 2005, etc).
I've read a question and an answer provided by Jon Skeet, describes the differences but I think for example, params keyword and IEnumerable both are part of C# the language not parts of libraries in .Net.
Am I wrong?
params is a C# keyword although other .NET languages may have equivalent keywords e.g. VB.NET has ParamArray.
IEnumerable is a .NET framework interface and not C# specific.
I suspect that a lot of resources on MSDN are auto-generated by some tool, similar to SandCastle. I would imagine that this tool outputs markup that includes all of Microsoft's popular modern languages.
params is part of the C# language proper. IEnumerable is part of the .NET Framework.
Look at the downloadable Express versions of Visual Studio, and you will see that each version of C# is tightly tied to the version of Visual Studio that supports it, while the .NET Framework is treated as if it were an outside library (which, in certain ways, it is. It is language-agnostic, for example).
What is the official marketing name for C# 4?
Apress writes "Visual C# 2010 Recipes"
Apress also writes "Pro C# 2010 and the .NET 4 platform"
O'Reilly also writes "Microsoft Visual C# 2010"
Jon Skeet and Scott Hanselman both write C# 4
yet Dino Esposito writes C# 4.0
this MSDN page is entitled Visual C# 2010 Samples, refers to C# 4.0, and people writing in the comments refer to both C# 4 and C# 4.0
If we are going to publish training material about C# 4, what term should we use?
Microsoft Visual C# 2010 is the C# specific part of the integrated development environment Microsoft Visual Studio 2010.
C# 4.0 is the language.
Microsoft .NET Framework 4.0 is the framework.
It is common to shorten 4.0 to 4.
This is a response to Adrian Grigores comment "The .NET version does determine the syntax and semantics of the C# language".
There are (at least) three partially independent version numbers - the .NET Framework version, the Common Language Runtime (CLR) version, and the C# version (see this StackOverflow question for a quite comprehensive list of Framework and CLR versions).
The C# version determines what language features are available. Language features are based on .NET Framework features - the included framework assemblies and CLR version. Finally every .NET Framework versions includes a specific CLR version that basically determines what is valid Common Intermediate Language (CIL) code and how it must be interpreted. Some examples.
C# 3.0 introduces automatic properties. This feature is build into the compiler and does not rely on new functionalities in the .NET Framework assemblies or even the Common Language Runtime (the .NET Framework 3.0 still contains the CLR 2.0). Therefore it is possible to build an application using automatic properties and targeting the .NET Framework 2.0 (maybe even 1.0 and 1.1).
C# 3.0 introduces LINQ. This feature is mainly build into the compiler but partly relies on assemblies new in the .NET Framework 3.0. LINQ to Objects for example relies on the new System.Core.dll containing the Enumerable class. It is however possible to fake this dependencies and therefore use LINQ to Objects with the .NET Framework 2.0.
C# 2.0 introduces generics. This feature relies on extension of the CIL in the CLR 2.0. Therefore it is not possible to use generics with the .NET Framework 1.0 and 1.1.
I'd go with C# 4.0
The first and third book you quoted refers to the visual studio subproduct (Visual C#), That's why they are using 2010 as the "version" number.
So since you you are going to write an article about C#, not Visual Studio, It's either 4 or 4.0. And since '4.0' makes it clearer that you are talking about a version number, C# 4.0 seems like the best choice to me.
The official name of the language is Visual C# <version>
I'll look for a reference .
Edit:
The ECMA-334 standard consistently calls it C#. So that is the name of the language.
Microsoft calls their implementation Visual C#. The other implementations (that I know of) are Mono C# and Rotor C#
And while the IDE is called Visual Studio <versionyear>, I think C# 2010 is a definite misnomer. But that doesn't lower its marketing value.
While the real technical name is C# 4.0 for the latest C# version, 2010 is the IDE's version.
For marketing purposes, 2010 might be used instead of 4.0, because people new to the language might be more tempted to the year number for it indicates that the book is tackling the technology with its recent update.
I'd say the language is C# 4.0, the tool is Visual C# 2010 (like Visual C# 2010 Express).
I would opt for C#4.0.
In the past you had
.NET 1.0 (C# 1.0)
.NET 1.1 (C# 1.0)
.NET 2.0 (C# 2.0)
.NET 3.0 (C# 2.0)
.NET 3.5 (C# 3.0)
and now
.NET 4.0 (C# 4.0)
The language is C# 4.0. The product is Visual C# 2010.
C:\Users\pminaev>csc /?
Microsoft (R) Visual C# 2010 Compiler version 4.0.30319.1
and then opening "%ProgramFiles%\Microsoft Visual Studio 10.0\VC#\Specifications\1033\CSharp Language Specification.doc", on the very first page
C# Language Specification
Version 4.0
IMHO i would call it by it's version.. so C# 4.0. Previous Versions were called by the same like C# 3.0 etc.
regards
Since C# 4.0 came out and currently can only be developed in Visual Studio 2010 (and no other version of VS), people seem to use both terms interchangeably.
Personally, I would rather see C# 4.0, as that is the version of the language, not of the IDE.
Using C# 4.0 may be the official name, but especially if your book is targeted to those 'less in the know', than adding 2010 and whatnot may let people know which version of Visual Studio you are talking about. If it's for professionals, you'll have no problem throwing around C# 4, but for beginners, saying C# 2010 will tell them the IDE they need to use. It's clearer, though not official.
Microsoft supposedly offer(ed?) something called the JLCA, which converts Java into C#. I can't find any download or anything for it. Does anyone have any information about this tool and how to use it in VS2008/2010? I can find version 2.0 but not 3.0... supposedly it came built into VS2005?
Microsoft Java Language Conversion Assistant 3.0
Anyway, it's discontinued:
Retirement of J# language and Java
Language Conversion Assistant from
future versions of Visual Studio
Since customers have told us that the
existing J# feature set largely meets
their needs and usage of J# is
declining, Microsoft is retiring the
Visual J# product and Java Language
Conversion Assistant tool to better
allocate resources for other customer
requirements. The J# language and JLCA
tool will not be available in future
versions of Visual Studio. To preserve
existing customer investments in J#,
Microsoft will continue to support the
J# and JLCA technology that shipped
with Visual Studio 2005 through to
2015 as per our product life-cycle
strategy.
Was C# compiler written in C++?
Yes, but there are plans to write a C# compiler in C#, which I believe was discussed in this podcast.
Yes.
The Mono C# compiler is written in C#.
The .NET framework was written in Simple Managed C (SMC)
History
During the development of the .NET Framework, the class libraries were originally written using a managed code compiler system called Simple Managed C (SMC).In January 1999, Anders Hejlsberg formed a team to build a new language at the time called Cool, which stood for "C-like Object Oriented Language".[16] Microsoft had considered keeping the name "Cool" as the final name of the language, but chose not to do so for trademark reasons. By the time the .NET project was publicly announced at the July 2000 Professional Developers Conference, the language had been renamed C#, and the class libraries and ASP.NET runtime had been ported to C#.
From: http://en.wikipedia.org/wiki/C_Sharp_%28programming_language%29
There is a new (as of late 2011) C# and VB compiler written by Microsoft called Roslyn which is written in C# and VB.NET respectively. Project page is here. The Roslyn compiler is written as a library that exposes a rich public API. There is a news article here about it from InfoWorld.
UPDATE:
As of April 3, 2014, Roslyn is open source under the Apache License 2.0.
Yes it was - as majority of CLR. If you want to see the internals of CLR and/or compilers I would strongly recommend Shared Source CLI from Microsoft (aka Rotor):
Microsoft Download
Wikipedia
Shared Source Internals book
But, there is actually a compiler written in C#. I believe that Mono is written that way. Download Mono sources and find out for yourself.
I downloaded and installed the .net framework 4.0, but I didn't install VS 2010, because VS 2010 require the high-performance computer hardware. I have no but I expect to taste the C# 4.0 feature.
you need the .net 4.0 compiler, which at the moment is only available with vs2010.
This thread might answer your question
Where I can download compiler for C# 4.0 without Visual Studio 2010?
The .NET framework client profile includes the compiler (csc.exe). For example, on my machine, it's at:
c:\Windows\Microsoft.NET\Framework64\v4.0.20506\csc.exe
The 32-bit version is at:
c:\Windows\Microsoft.NET\Framework\v4.0.20506\csc.exe
If you're familiar with the command-line compiler syntax, most applications can be written just using it, notepad and referencing the appropriate assemblies. It won't be a terribly pleasant experience though.