C++ vs. C#

Pages: 12
I was wondering how different C++ and C# are, I've heard that C# is wonderful for game programming and was wondering if it would be relativly easy to learn already having a decnt grasp on C++, thanks
How's your grasp on Java?
I would suggest D, if you'd like to see what C++ should have been (in my opinion).
That said, D has a small community and is constantly changing... and may never be standardized... so unfortunately it's not suited for "real" work.

More on topic: I don't know which would be better between C++ and C# for game development. Isn't XNA dead yet?
Isn't XNA dead yet?


yes it is
> I was wondering how different C++ and C# are

C# is spiritually closer to Java than C++.

One could say that C# is Java with a college education.
closed account (N36fSL3A)
Not the best topic. I expect this to last for many, many pages.

If you're doing some CPU intensive calculations, go C++.

If you want to do some quick games and see results fast, go C#.
To answer OPs question, knowledge of C++ will make picking up the syntax easier. However knowledge of Java will probably help you more.
closed account (N36fSL3A)
^I bet this will be the start of the Java v C++ argument.

Every language argument on here turns into that.
http://i.imgur.com/F2rJq4b.png
Last edited on by Fredbill30
Nah. We'll turn it into a Java vs C# argument the moment a language debate breaks out.
Fredbill30 wrote:
* "y u do dis" gif *
You did this by mentioning it.

@OP
C# is similar to C++. But then so is every other imperative programming language. They're all based off of the same concepts that after you've picked one up it's pretty easy to pick up the next -- you don't have to relearn semantics, just syntax.

tiwggystardust wrote:
I've heard that C# is wonderful for game programming
This would only be because of engines such as XNA or Unity that have already been developed by Microsoft (or some other party) for the purpose of creating games. C#, the language, has no concept of games, and is not optimized for it necessarily.

Keep in mind that C# is platform dependent. It's designed for windows only, which may or may not be a good thing.
There are some third party applications that allow C# applications to be executed on Linux and OS x machines, but that's not something I would rely on when developing commercial applications.
Last edited on
It can safely to into a Java v C# discussion because C# is basically Microsoft's answer to Java.
closed account (N36fSL3A)
Alright. It's about time something turned into <some other language besides C++> and Java.

How is C# similar to C++? I thought the the program was contained into a class and namespace.
Last edited on by Fredbill30
You can't get into a C++ v C# without having Java mentioned because C# is basically Microsoft's interpretation of Java as they think it should be. Though, C++ is the superset of C but every language after that used C++ as a blueprint and then added where they felt C++ fell short. In short, C++ is similar to almost every recent language because recent languages are loosely based off C++.
I bet C# is a cool guy, but if we're talking about what's wonderful for game programming then it depends what you mean by 'wonderful'.

Word on the street is if you want a quick program C# is better, and if you want a pro game C++ is better. Anyone else heard this?
closed account (S6k9GNh0)
Word on the street also says VM-based languages is the answer to everything and if your program uses to much memory, throw more hardware at it instead of fixing your program. Former isn't such a big deal, latter definitely irritates me.
Last edited on
Last edited on
@computerquip
That's not necessarily such a problem. It depends which is cheaper, at least for professional software where such decisions are out of the hands of the programmers (you know, the ones whose job it is to know about memory usage). Right now memory is probably more expensive than code, so it pays to limit your usage, but if memory was cheaper then there'd be no point in saving memory at the expense of longer development time.
closed account (S6k9GNh0)
From a business perspective, I can somewhat understand. From a programmers perspective, it's shameful.
Word on the street also says VM-based languages is the answer to everything and if your program uses to much memory, throw more hardware at it instead of fixing your program. Former isn't such a big deal, latter definitely irritates me


You really just made my day with that, especially with
throw more hardware at it instead of fixing your program


I can't count how many times I've heard "It doesn't matter hardware is getting better" Better hardware isn't an excuse to gradually become more and more careless with managing your resources.
especially considering that processors aren't getting faster, they are getting more parallel.
Pages: 12