tags:

views:

764

answers:

10

It's my favourite language at the moment and I'm interested in learning its history.

+4  A: 

Java.

Simple question, simple answer.

Sam Meldrum
Why did they not just use Java like everyone else?
Davie
http://en.wikipedia.org/wiki/J_plus_plus#Litigation_against_J.2B.2B
Pavel Minaev
@Davie: *Everyone* used Java at that time?
Cecil Has a Name
Was Java not the most popular OO language at the time c# was being developed? I should have been more specific :-(
Davie
Pavel Minaev
Microsoft were rapidly losing developer mindshare to Sun as a result of the success of Java. They needed to win that mindshare back. Hence the CLR, C# and the .Net framework. - Probably should have gone for a longer answer, but I like pithy.
Sam Meldrum
+16  A: 

Semicolons are mathematically proven to make your language at least 9% sexier.

Nick
78% of all statistics... Ah well, you get the point.
Jan Jongboom
right, but C/C++ already had semi-columns...
Thomas Levesque
why is this the top/chosen answer?
Evan Plaice
Because recent studies out of Canada have shown 82% of people have a sense of humor...
Nick
+1  A: 

Try to get away from the 'Basic' stuff as C(++) and Java devs thought VB was way too lame to switch.

Furthermore: It sounds way cooler on parties when saying 'Hey I'm C-SHARP!', then 'I'm Visual Basic'. Just ain't gonna score you anything.

Jan Jongboom
+15  A: 

Here's a little history.

ctacke
Decent link, but link-only makes for a poor answer. Could you summarize or rephrase what's detailed on that page, and/or perhaps add another reference?
Shog9
I could, but then I'd be part of the Department of Redundancy Department.
ctacke
A: 

42

dove
-1 every time that's used to answer a serious question it moves one step closer to becoming another lame overused (and humorless) internet meme. Please, think of the kittens.
Evan Plaice
@Evan did you follow and read the link? The shortness of my answer was meant to a pithy take on the inane solution you refer to, while the number actually refers to the Building 42 in that article. Couldn't agree more with your sentiment, even if I think it's misplaced and followed by a rather well worn joke yourself ;)
dove
@dove lol, I didn't even realize it was a link. Either way, that link is already referenced in at least two other answers in this question. Since it's actually a serious answer I'll try to zero it out when I'm allowed to vote again.
Evan Plaice
+6  A: 

General consensus is that they wanted a post-C++ language that had all the stuff Java offered, but wasn't tied to the JVM. As Sam Meldrum noted, the CLR and C# are basically Java and the JVM implemented by a different development team.

The CLR has also allowed them to consolidate a lot of under the hood work so that improvements in language capabilities can be shared between Visual Basic and C#; it gives them a clean 'Noob language' vs 'Pro language' upsell opportunity.

Eaton
There's more to it. For example, note how CLR is powerful enough to have full ISO C++ implemented on top of it - think raw data/function pointers and arithmetic, unions, `stackalloc`... JVM was simply never there.
Pavel Minaev
Not just C++, but dynamic languages too. See this blog post: http://blogs.msdn.com/hugunin/archive/2009/04/14/ironpython-in-action.aspxJim Hugunin was a pioneer of running dynamic languages on the Java VM. He tried the same thing on the CLR and was so blown away by how much better the CLR was, he switched over completely and now works for Microsoft.
Daniel Earwicker
Microsoft never marketed VB.NET as a “noob language”, ever (not even in comparison to C#).
Konrad Rudolph
That's because MS are very gracious.
Robert Grant
This is entirely a matter of perspective.Note that VB6 is object oriented, has a runtime, has the GUI designers and the code behind programming, etc. - it really makes sense to see .NET as a logical continuation of VB6 and C# as an attempt to get the C++ programmers on board.
reinierpost
@reinierpost you forgot the last point, "and let VB die"
Evan Plaice
@Evan Plaice: it depends on what you mean by 'VB'.
reinierpost
A: 

C# is also an easier way to do components than COM/C++. COM is neither an easy nor a forgiving environment to program in. I don't know all of the technical details, but I do recall that a lot of the things that COM provided through lots of work C# provides for 'free'.

quillbreaker
+15  A: 

Below is a brief outline I did for someone a while back answering this question:

C#

  • intended as a simple general - purpose object-oriented programming
  • development led by Anders Hejlsberg
    • Hejlsberg previously had designed Borland's Turbo Pascal
  • syntax similar to C++
  • initially called COOL for C-like Object Orientated Language
  • renamed C# because it is a step above C/C++
    • # (sharp) means a semi-tone above in music
    • can also be viewed as a stacked 4 pluses so C++++
  • C# is the .NET language that is most similar to the CLR
  • Hejlsberg strived to create constructs as answers to issues he saw in (C++, Java, Delphi etc.)
    • Stated Goals
      • support for software engineering
        • strong type checking
        • array bounds checking
        • detection of attempts to utilize uninitialized variables
        • automatic garbage collection
      • software robustness and durability are important
      • allow for use in distributed environments
      • not intended as direct competitor C/C++

Further Reading

ahsteele
+6  A: 

Microsoft were using Java, they had their own JVM and supported it in Internet Explorer, but they wanted Java to interoperate with existing C++/VB code bases, and extended Java to provide that.

Sun didn't like that, because it didn't want to see "Microsoft Java" applications that wouldn't run on Sun hardware, so it took them to court to have Microsoft's Java implementation banned, and won.

Without those extensions, Java's appeal to Microsoft (namely, as a much superior replacement for both C++ and VB in most of their application areas) was lost, so they recreated what they needed as C#/VB.NET.

reinierpost
+3  A: 

The codename of C# was Project Cool, which was rumoured to be a clean-room implementation of Java. This was back in the days when Sun was suing Microsoft over bastardizing the Java language. As I recall, Sun didn't like the Microsoft-specific extensions in J++, which allowed it to interoperate with COM. So where did the name C# come from?

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. (Being a musician myself, I think this is awfully fun.) Back when .NET made its debut, an amusing quip from the Linux crowd was to refer to C# as Db (D-flat), which is the same note as C#, but has different connotations. Two MS Research languages also bear musically-related names: Polyphonic C# and F#.

From C#/.NET History Lesson.

eKek0
+1 good answer.
Evan Plaice