views:

380

answers:

10

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?

+1  A: 

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)
XIII
that seems the most consistent, yet I first saw "C# 3" and "C# 4" in Jon Skeet's book (I think he even mentioned why he chose these terms but don't have the book on me at the moment) and since then have been seeing "C# 4" and ".NET 4" more often.
Edward Tanguay
.NET Framework 4 and C# 4 are in fact the correct (as defined by MS) terms _for this version of C#/.NET_ (and .NET 4.0 and C# 4.0 are incorrect).
Pavel Minaev
thanks pavel, your answers above seems authoritative, but regarding "C# 4.0" being incorrect, you mention above that in "%ProgramFiles%\Microsoft Visual Studio 10.0\VC#\Specifications\1033\CSharp Language Specification.doc", on the very first page it says "C# Language Specification, Version 4.0". Do you have a link to a Microsoft site which states that ".NET Framework 4 and C# 4 are in fact the correct", since you also mention above "The language is C# 4.0."
Edward Tanguay
Well, it's interesting like that. All marketing docs that I've seen uses ".NET 4" and "C# 4" and so on. Reminds me of Java 5 version 1.5.0 :)
Pavel Minaev
A: 

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

ReaperXmac
A: 

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.

Oded
Noldorin
Come on, @Noldorin, csc and *notepad* is the way forward ;-)
Dan Puzey
what does the word "Visual" in "Visual C# 2010" mean? simply that you are using C# 4.0 with some version of Visual Studio? And if you use csc.exe then you are not using "Visual C# 2010" but "C# 4.0"?
Edward Tanguay
@Dan: Hah, very true.
Noldorin
@Edward: try running `csc.exe /?`, it'll tell you what it calls itself.
Pavel Minaev
+1  A: 

I'd say the language is C# 4.0, the tool is Visual C# 2010 (like Visual C# 2010 Express).

ho1
+4  A: 

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.

Adrian Grigore
So if I am going to publish a video training which teaches the C# 4.0 language and in the video I use "Visual C# 2010 Express" and "Visual Web Developer Express" to do this, then the video should be called "Visual C# 2010"? What is it that "Visual C# 2010" has that "C# 4.0" doesn't have? Or, when would one ever practically use C# 4.0 without using Visual Studio?
Edward Tanguay
If using Mono|SharpDevelop, for example. More features than Express, cheaper than VS...
mavnn
or as ho1 suggested, does "Visual C# 2010" actually refer to the Visual Studio software itself *when it is used to program in C#* and the language itself is always referred to as C# 4.0?
Edward Tanguay
"The 4.0 refers to the .NET version, which is what actually determines the syntax and semantics of the C# language." is not correct. The version of the .NET Framework is independent from the C# (language) version.
Daniel Brückner
@Daniel Brückner: "The version of the .NET Framework is independent from the C# (language) version": What do you mean by that? The .NET version does determine the syntax and semantics of the C# language.
Adrian Grigore
I added a response to my answer because it became way to large for comments. I hope this clarifies my point.
Daniel Brückner
@Daniel Brückner: Sorry Daniel, but even after reading your answer I still don't get your point. What I meant is that if you are using .NET 4.0 to compile C# code, you can rely on a well defined syntax and semantics of the C# language. For example you can rely on LINQ being supported in C#, because that's part of .NET 4.0. Can you name any example where my assumption would be wrong?
Adrian Grigore
The C# compiler just produces CIL code. This is completely independent from what happens when the CLR executes this code - the .NET Framework does not influence the C# compiler or determine the C# syntax and semantics. Although the installed .NET Framework version limits the set of C# features that you can execute after compilation.
Daniel Brückner
@Adrian: you can use C# LINQ with .NET 2.0/3.5 - see http://www.albahari.com/nutshell/linqbridge.aspx. You can also use any C# 4.0 features that do not require library support on .NET 2.0/3.5 immediately (e.g. `var`, lambdas etc). That is to say, while .NET 4 includes Visual C# compiler that supports C# 4.0 language, the output of that compiler is not generally tied to .NET 4.
Pavel Minaev
@Pavel Minaev, @Daniel Brückner: Point taken. I've deleted that sentence from my answer.
Adrian Grigore
+13  A: 
  • 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.

Daniel Brückner
There are other features that depend solely on the C# version: for instance, the `var` keyword can be used with the .NET Framework 2.0 even though it was introduced in C# 3.
zneak
Of course - I just tried to pick one good example for all the cases but I am not really satisfied with my choices.
Daniel Brückner
+2  A: 

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.

SiN
+1 that is a good point to simply use "2010" to suggest state-of-the-artness, since I haven't found a technical difference between the languages "Visual C# 2010" and "C# 4.0" yet.
Edward Tanguay
@Edward: the difference is in minor deviations from the spec, such as the ability to cast `int[]` to `uint[]` and back, as well as language extensions such as `__arglist`.
Pavel Minaev
+3  A: 

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.

Henk Holterman
That's a slightly new variation. It's starting to seem like you can just pick any of these names you want to use. Have any of you who have authored books or articles had discussions on which name was correct to use for your particular topic?
Edward Tanguay
@Edward: I think yes. While C#2010 is officially nonsense, it still could help sell a book.
Henk Holterman
Your reasoning makes sense, which means that the Apress book title "Visual C# 2010 Recipes", the topic of which is almost entirely about ways to use the language C# 4.0 per se and not about ways to use the Visual Studio 2010 IDE, is a misnomer. I think the most accurate title for that book would be "C# 4.0 Recipes".
Edward Tanguay
FYI, there is a product called "Microsoft Visual C# 2010 Express", so, no, it's not nonsense.
Pavel Minaev
@Pavel, I read that as "Microsoft Visual [Studio] C# (2010 Express)". There is no 'Express' version of the language, only of Visual studio.
Henk Holterman
@Henk: see my answer to this question.
Pavel Minaev
A: 

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.

DMan
+1  A: 

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

Pavel Minaev
Hmm, _that_ product is the compiler. but I'm inclined to agree that compiler==language in this case.
Henk Holterman
Why? It's not claimed to be the only compiler for that language, nor a reference implementation for it. The language is as defined by the spec.
Pavel Minaev