Origin of the C# language name

C#Programming LanguagesHistory

C# Problem Overview


I am a C and C++ programmer and am now trying to learn C#. I have bought the book Professional C# by Wrox publications.

While migrating from C to C++ I had a doubt why ++ was added to C. Later on I realized that since ++ is an increment operator and it was added to C just to provide an 'Object Oriented Extension'.

In C#, what is the significance of #?

C# Solutions


Solution 1 - C#

>The name "C sharp" was inspired from musical notation where a sharp indicates that the written note should be made a half-step higher in pitch.[6] This is similar to the language name of C++, where "++" indicates that a variable should be incremented by 1. The sharp symbol also resembles a ligature of four "+" symbols (in a two-by-two grid), further implying that the language is an increment of C++.

Due to technical limitations of display (standard fonts, browsers, etc.) and the fact that the sharp symbol (♯, U+266F, MUSIC SHARP SIGN) is not present on the standard keyboard, the number sign (#, U+0023, NUMBER SIGN) was chosen to represent the sharp symbol in the written name of the programming language.[7] This convention is reflected in the ECMA-334 C# Language Specification.3 However, when it is practical to do so (for example, in advertising or in box art[8]), Microsoft uses the intended musical symbol.

From Wikipedia.

Also, in this interview, Anders Hejlseberg says:

> "We wanted to have a reference to the language’s C heritage in the name and finally settled on C#. Some other candidates I recall were e-C, Safe C, C-square, C-cube, C-prime, C-star, and Cesium… Looking and those now I’m pretty happy with our choice."

Finally, Naomi Hamilton asked Anders Hejlseberg the question directly:

> [NH] Why was the language originally named Cool, and what promoted the change to C#? > > [AH] The code name was Cool, which stood for ‘C like Object Oriented Language’. We kind of liked that name: all of our files were called .cool and that was kind of cool! We looked seriously at keeping the name for the final product but it was just not feasible from a trademark perspective, as there were way too many cool things out there. > > So the naming committee had to get to work and we sort of liked the notion of having an inherent reference to C in there, and a little word play on C++, as you can sort of view the sharp sign as four pluses, so it’s C++++. And the musical aspect was interesting too. So C# it was, and I’ve actually been really happy with that name. It’s served us well.

Solution 2 - C#

Given that this is a programmer's web site, perhaps it is interesting to list the "real names", the names that the Microsoft programmers used when they worked on the projects. These names tend to show up, like archeological records, in the source code for the CLR (Rotor), SDK header files and the Reference Source.

C# started out as COOL (C-like Object Oriented Language). The Rotor makefiles show that early C# code might have been written in files with the .cool filename extension. However, there are also several places where it is named COOLC.

The CLR had several names. It started out as a project inside the group that worked on Windows 2000's COM+, there are many references to "ComPlus" in the CLR source code. The exception code for a managed exception is 0xe0434f4e, 0xe0 + "COM"+1. In the WinError.h file, CLR error codes use "URT", "Universal Run Time". The contraction "Cor" appears in many places in the hosting interfaces, "COM Object Runtime". CLR source code very commonly uses the EE acronym, distinct from COR, short for Execution Engine and part of the changes in the CLR code base to get it to execute managed code.

Internal project names I've seen:

  • Rainier: Visual Studio 2002
  • Everett: Visual Studio 2003
  • Whidbey: Visual Studio 2005
  • Orcas: Visual Studio 2008
  • Hawaii: Visual Studio 2010 (very early)
  • Rotor: Shared Source version of the CLR
  • Avalon: WPF
  • Indigo: WCF
  • Yukon: SQL Server 2005
  • Katmai: SQL Server 2008
  • Strike: a custom debugger extension used to debug the first version of the CLR, evolved into SOS (Son of Strike).

Solution 3 - C#

In 1991, Al Stevens introduced D-Flat in Dr. Dobbs Journal (DDJ); a DOS-based, event-driven framework for building user interfaces (see http://www.ddj.com/184408553). At the time, D-Flat was written in C, because Al Stevens wrote the C Programming column for DDJ. The name C++ was already taken and he had considered C-Sharp, but was convinced that someone had already thought of it (see http://www.ddj.com/184410858). My opinion is that Al Stevens had been thinking about the name C-Sharp for a long time, because D-Flat was not a whim and he has so much language experience.

Solution 4 - C#

Have a look at this explanation: http://www.jameskovacs.com/blog/CNETHistoryLesson.aspx

> C# name was musically inspired. It is > a C-style language that is a step > above C/C++, where sharp (#) means a > semi-tone above the note.

Solution 5 - C#

The '#' is actually meant to be a musical sharp symbol - as ++ indicates C++ is C incremented, # indicates C++ incremented, or C++++; a language with C-syntax, offering higher-level functionality.

Check out the wikipedia article on this.

Solution 6 - C#

It's just a name. The # character is taken from the musical notation meaning C# (C sharp) is half a note above C.

C# is partly based on C/C++, but also on Java and Pascal (Delphi). Like Java, C# is an object oriented language, while C++ and Pascal are procedural languages with added capability for object orientation.

Solution 7 - C#

In addition to the musical references noted elsewhere, observe that '♯' and '#' look like two '+' symbols overlapped.

In the end, though it was a marketing decision, not a technical one.

(As an aside: at the time, we thought it was a poor choice because search engines would ignore "special" characters, and you'd get results for 'C'. Now, search engines are smarter.)

Solution 8 - C#

C# is a musically inspired named and there is also Polyphonic C#

Solution 9 - C#

The '#' is actually meant to be a musical sharp symbol - as ++ indicates C++ is C incremented, # indicates C++ incremented, or C++++; a language with C-syntax, offering higher-level functionality.

Solution 10 - C#

well while c++ is c with "Object Oriented Extension", c# on the other hand is not based on c only the syntax and is totaly object oriented and compiles to msil while native c++ compiles to native binary code...

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionPrasoon SauravView Question on Stackoverflow
Solution 1 - C#Gregory PakoszView Answer on Stackoverflow
Solution 2 - C#Hans PassantView Answer on Stackoverflow
Solution 3 - C#Joe MayoView Answer on Stackoverflow
Solution 4 - C#driisView Answer on Stackoverflow
Solution 5 - C#ljsView Answer on Stackoverflow
Solution 6 - C#GuffaView Answer on Stackoverflow
Solution 7 - C#Jay BazuziView Answer on Stackoverflow
Solution 8 - C#jlruView Answer on Stackoverflow
Solution 9 - C#Petter berrieView Answer on Stackoverflow
Solution 10 - C#PeterView Answer on Stackoverflow