This is a split board - You can return to the Split List for other boards.

Why do so many people use C++ over C#?

#1Knighted DragonPosted 9/9/2013 12:03:43 PM
I'm learning C# right now and I prefer VB to it, but C# isn't that bad, and from what I understand isn't it just a newer C++? Google didn't help clarify the point of using C++ over C# besides people who know C++ not liking change. Is that actually the reason, or does it have any benefits beyond C++ already being established in most places?
---
Matthew 7:21
http://img15.imageshack.us/img15/2492/gyenyame.jpg
#2Orestes417Posted 9/9/2013 12:10:33 PM
Performance, wider platform support, and not being handcuffed to Microsoft come to mind immediately. That and the fact it's extremely rare a programmer gets to choose the language they work with in the corporate world.
---
If they asked how I died tell them: Still angry.
#3electroflamePosted 9/9/2013 12:20:56 PM
C# is more convenient to use, but C++ is more "traditional".

C# can be just as multiplatform as C++, but most engines are already written in C++, and most programmers are already familiar with C++.

Personally, I prefer C# to C++, but each language has it's different merits. C++ is better for low-level, "gotta scrape the most performance out of this" type of thing, but C# is better for getting things done quickly and easily, and not having to worry about cleaning up all of your memory/pointers, etc. C# is newer, so there's that, too.

Depends on the task, really. More things are starting to use C#, but C# won't replace C++ any time soon. I do believe it's more about C++ being more battle-proven, and established than C#, not that C# is inherently more crappy than C++.
---
Could be worse, they could have been American givers and you would have been smothered in small pox. -fakenamefignuts on Indian-Giving.
Steam ID: electroflame
#4Orestes417Posted 9/9/2013 12:37:43 PM
C# can be just as multiplatform as C++.
Not in this reality it can't. Not by a loooooooooong shot.
---
If they asked how I died tell them: Still angry.
#5jordandrakoPosted 9/9/2013 12:40:44 PM
It's Microsofts answer to C++ but it isn't as versatile.
---
i5-3570k @ 4.0Ghz | Gigabyte GTX670 | M4 128GB SSD | 2.5TB HDD | DDR3 1600 8GB | 520W
http://imgur.com/a/uSBwE
#6RPGMattPosted 9/9/2013 12:55:13 PM
[This message was deleted at the request of the original poster]
#7CC RicersPosted 9/9/2013 1:14:03 PM
Orestes417 posted...
C# can be just as multiplatform as C++.
Not in this reality it can't. Not by a loooooooooong shot.


Depends on how low-level you want to go. Mono can certainly make porting some things easier, though I've seen it mostly done for certain games and windowed GUI apps.

C++ is still supported for legacy apps, but I see more jobs asking for Java and C# programmers than native C++ programmers.

The major exception being video games. it's still very common to need C++ for engine development, and any higher level languages are used for scripting or developer tools.
---
WikiLeaks scandal: WikiLeaks is not a true Wiki!
#8electroflamePosted 9/9/2013 1:17:38 PM
From: Orestes417 | #004
Not in this reality it can't. Not by a loooooooooong shot.

It most certainly can, it's just generally more work. If the platform doesn't support it natively, you need some kind of cross-compiler or something of the sort. (Luckily, there's a ton of cross-compilers for C# already out there -- chances are there's one to fit your current project's needs, etc.)

Remember, just because it's written in C# does not mean that it has to be compiled using a C# compiler into compiled C#.
---
Could be worse, they could have been American givers and you would have been smothered in small pox. -fakenamefignuts on Indian-Giving.
Steam ID: electroflame
#9luigi13579Posted 9/9/2013 1:22:07 PM
It's just about using the right tool for the job really. C++ is better suited to some things, while C# is better suited to others.

C++ is good if you need more control over memory and/or need to work at a lower level (e.g. for systems programming, intensive graphical applications like AAA 3D games, GUI applications that you want to be as responsive as possible, etc.).

C# manages memory for you with garbage collection (although there are still some things you need to be aware of), so it's a bit easier to use in that regard. You should be using smart pointers in C++ though, as they make memory management a hell of a lot safer, and in many cases have virtually no overhead (shared_ptr is one exception).
#10SinisterSlayPosted 9/9/2013 1:24:55 PM
C++ for performance, C# for easy development.
That's basically it.

So when your developing something that must run as fast as possible, you will use C++.
When you are developing something that must be developed as fast as possible, you will use C#.
---
He who stumbles around in darkness with a stick is blind. But he who... sticks out in darkness... is... fluorescent! - Brother Silence