Sign in to follow this  
Zaku

whats the diffference between c and c# and c++

Recommended Posts

C# rocks, all the rest of them suck!















... ok, kidding.

C is the oldest, its a procedural language. ( Aka, its built around the concept of functions ).

C++ is a quasi-Super set of C. It took most of what C did, and added objects on top of it.

C# is the newest, and least related. It requires a runtime on the target machine to run. Syntax wise, its a cross between C++ and Java.

Of those three, the easiest to learn is either C# or C. C is probrably easier to learn the basics of, as it has a very small library of functions you need to learn. That said, it doesnt hold your hand worth a damn, so you can really screw up. C# has a very good library of functions to go with it, that makes it a very productive language, once you figure out how to use that library. C++ is easily the hardest of those 3 to learn, unless your some kind of Idiot Savant type that thinks in C++ naturally.

Define best. Most common, definatly C++. Most productive, I would say C#. Supports most platforms C then C++. Most game libraries, C++.

As an example of productivity, I tend to be about 4 times more productive in C# then I am in C++. Then again, when I hit a wall, it tends to take me longer to figure the problem out.

Share this post


Link to post
Share on other sites
Well the easiest language to learn and be productive with of the three mentioned would have to be C#(C Sharp). It is a managed language to an extent. Where as C and CPP both fully compile before use, C# uses a 'Just In Time' compilation. Meaning that once the end user runs it for the first time it compiles. This is actually benificial in some cases because it takes into account each individual users computer so it can better optimize itself. Sadly, C# programs will only run on Windows based systems and Xbox360. C and CPP on the otherhand will run on almost all platforms.

I would have to say that C# is the best bet for any beginner. I have been tinkering with it and in a matter of hours I was able to do things that would have taken me DAYS with CPP.

Also to note is that C# is not nearly as industry accepted for games as CPP. So learning CPP at some point will certainly make getting a job in the industry much easier. Hope that helps.

Share this post


Link to post
Share on other sites
Quote:
Original post by -JetSirus-
Sadly, C# programs will only run on Windows based systems and Xbox360. C and CPP on the otherhand will run on almost all platforms.


Languages themselves are not bound to any one platform(or at least they shouldn't be). C# programs can run on Windows, Linux or Macs as long as they use Mono, but programs compiled using Microsofts compiler only run on windows. Libraries/APIs are also part of it since DirectX and WinForms(some has been ported though) only work on Windows. The same rules apply to C and C++ too, you can't make a C++ program in Visual C++ with DirectX and expect it to run on anything other than Windows.

Share this post


Link to post
Share on other sites
I just finished readin the first link that you posted there Promit, and it was so full of misinformation as to not be funny, mostly on the proC++ side.

Then again, any thread where you have a pro C++ or pro C# side, is mostly a waste of time to read. Zealots are idiots, regardless to their zealotry.

If I could offer one piece of advice, when reading the pro's of a language, read what the zealots have to say. When reading the con's of a different language, never listen to a zealot.

Share this post


Link to post
Share on other sites
Why do we always get these threads all at once? :/

They're different languages that happen to share a common background. The best thing, if you're genuinely interested, is to learn what each one is, separately. If you're just trying to pick which one to use, and you haven't programmed before, there's a high probability that "none of the above" is correct.

Share this post


Link to post
Share on other sites
Quote:
Original post by Serapth
I just finished readin the first link that you posted there Promit, and it was so full of misinformation as to not be funny, mostly on the proC++ side.
I'm afraid the pattern continues throughout every thread. Very nearly none of the posters in any given thread know much about what they're talking about, and the ones who do are frequently drowned out.

I don't know what I'd do if I were someone who had to answer this question. I'm in the comfortable position of having used nearly every major language extensively on nearly every major desktop platform, so I had the chance to make up my own mind after a lot of experience.

Share this post


Link to post
Share on other sites
Thats one of the reasons im glad I started programming before the internet came into existance. I learned lots of things via trial and error, which probrably isnt the most efficent way to do it. However, I formed opinions based off my experience's not some annoymous internet "expert".

Generally now, the ones I tend to listen to are the pragmatists. If I detect a lot of emotion behind someones post, I generally regard it as tainted. ( See slashdot or many examples ;) ).

By the way, I noticed my ranking or rating just dropped about 30 points. I dont know why or how that works. Does your rating have any actual bearing in reality ( aka, if my rating goes to low, will I lose functionality?), or is it purely an ego thing?

Share this post


Link to post
Share on other sites
For me, C# is the best choice for what I plan to do with it. And honestly that's what it comes down to. You can find a good argument for almost every language out there, except perhaps Brainf*ck(sp?). I plan to go indie and stay that way. The business model is better for me. Also, alot of the games I intend to make don't need to be cutting edge graphics wise..

A bit of wisdom:
There is no perfect language for every situation. However, for every situation there is a perfect language.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this