Alex Rivera | Logout

What advantages can I get from learning C++ if I'm mainly a C# Programmer?

Asked 2009-10-01T00:30:32.693
28

Recently I've started to notice a lot of smirks and generally rude comments whenever I mention C#. Everyone I talk to either says learn Python or learn C++.

Python is a nice language, I get it. But I don't find much use for it right now (for my use cases), and C++ I heard is a faster language (not sure).

So my question is this, what advantage can I get from learning C++ (besides the knowledge and expansion of my horizons), when I mainly program in C#?

Edit
Report

2 Answers

6

There are reasons to use pretty much any language.

C and C++ have uses in that they are compiled into native code rather than running on a virtual machine. There is a speed advantage and it also means these programs can run without having a 50MB+ framework installed.

Pretty much all games (certainly first person shooters) are written in C or C++.

Is this applicable to you? No idea because I have no idea of what you're trying to achieve.

What will you learn from C or C++? Pointers, memory management and the like. It's quite a different world from more modern garbage collected languages like C#, Java or Python.

answered 2009-10-01T00:35:41.660
1

It depends what programs you're working on. I've never used Python before, so I can't comment on that.

As for C++; most performance critical software is written in it due to its speed. You have more power over your hardware, but with that power comes responsibility and a steeper learning curve. It also doesn't have access to .NET; so you'll probably have to dig into Win32 programming for doing some of the tasks!

Examples of where C++ is used: Game development, aerospace, air traffic control systems.

Personally, I think that learning C/C++ makes you a better programmer overall, it teaches you many things; especially about performance and memory. And also well.. pretty much everything important is built in C++.

answered 2009-10-01T00:43:08.010

Your Answer