I was talking to a teacher friend of mine who said that at the University in Newcastle NSW they are going to start teaching C sharp instead of C++ next year. I googled c sharp but never really got an ideal answer as to what is the essential difference is between the two.
When I asked him why they intended teaching C#, he said that the university felt it was superior to C++ ?? Quite frankly, this amazed me.
Over the last few months that I have been teaching myself C++ I have of course repeatedly seen the C# icon on the net but just dismissed it as some derivative of C++...
Anyone got the difference in a nutshell they would care to share. Thanks.
C# is a Microsoft proprietary language based on .NET.
The learning curve for C# also tends to be not as steep as C++, especially if you have some experience in .NET. If you're working solely in a Microsoft .NET environment, C# makes sense. If you're working in a unix, Linux or multi-platform environment C++ is the only way to go.
C# is covered by Microsoft patents and is, as said, connected to .net which is Windows Specific.
It's much less flexible than C++ - you can't program low-level applications like Operating Systems.
C++ is nearer to the system.
Much less plattforms can be programmed with C# (afaik only ix86).
Some rules of the C# syntax are extremely childish. It won't let you define variables in conditions or fall through cases in a switch.
And C# is less common in professional software development.
C# is definitely not superior to C++ and should because of its dependency on Microsoft not be teached in schools or universities.
C# Program needs a lot of prerequisites to rum in your system and tend large file distribution ,example if you made your program with .NET 4, so your user must have it installed which too large for s old computers...i made my c++ Media player sized 5MB only but am sure with C# it will be 20MB++.Go with C++ guy...
I would assume that once having learnt C++ that learning C# would then be relatively simple, since AbstractionAnon mentioned the learning curve is not as steep.
I actually cant believe its a Microsoft 'spinoff' and its going to be taught!?
Anyway thanks for the feedback.
Oh yeah thanks for the .net reference, it gives me something else to chase down on the web.
Some rules of the C# syntax are extremely childish. It won't let you define variables in conditions or fall through cases in a switch.
And C# is less common in professional software development.
C# is definitely not superior to C++ and should because of its dependency on Microsoft not be teached in schools or universities.
-2 for FUD and trolling. Ever heard of Mono? Or features that C# has, that C++ won't have in the next 10 years (LINQ, closures, generic type variance and bounds, true modularity, stable ABI, powerful standard library)?
There appears to be a lot of differences between C++and C#.
The following quote from the article seems scary though, so I'd think twice about developing any "for profit" apps using C# :
In a note posted on the Free Software Foundation's news website in June 2009, Richard Stallman warned that he believes that "Microsoft is probably planning to force all free C# implementations underground some day using software patents", and recommended that developers avoid taking what he described as the "gratuitous risk" associated with "depend[ing] on the free C# implementations".[32] The Free Software Foundation later reiterated its warnings,[33] claiming that the extension of Microsoft Community Promise to the C# and the CLI ECMA specifications[34] would not prevent Microsoft from harming Open-Source implementations of C#, because many specific Windows libraries included with .NET or Mono were not covered by this promise.
I don't see any trolling there and you're welcome to ignore it instead of getting angry and yes, I know about mono. Saying C++ had no "powerful standard library" could be interpreted as trolling as well.
Edit:
Wise words, underneath this post. :P
Just ignore me.
Newsflash: This just in from news.cplusplus.com, recent scientific evidence has shown that haters and trolls are going to hate and troll, and that one should just ignore them and just move along.
C# derives from Java. It has less in common with C++.
Mono is a port of C# to POSIX, but I don't know where they stand legally. No company wealthy enough to be sued will touch it as a result.
Each version of Visual Stdio supports a different version of .Net/C#. Being proprietary, the evolution of .Net/C# and associated tools are completely under Microsoft's control. Backward compatibility means little and so features are dropped between versions.
IMO the existence of Mono doesn't make .Net cross platform.
Exist things like WINE and gycwin but they don't make POSIX and Windows APIs cross platform.
Windows API is for Windows Operating Systems, POSIX API is for POSIX Operating Systems.
The same applies to CLI/CLR/.Net/howeveryoucallit
How are patents related to being cross-platform? Probably most of those patents are not valid, anyway. The Gnome desktop community doesn't care, besides Microsoft promised not to use those patents agains open-source implementations. Some important Linux applications for Gnome desktop have been written in C#.
Back to that "cross-platformness" thing:
C# is cross platform as long as you limit yourself to some subset of its APIs. This is exactly the same as C++, except that in case of C++ the subset of ANSI/ISO portable standardized APIs is narrower.
so features are dropped between versions.
Which features have been dropped from C#, that require massive code rewrites?