bbrewder wrote:
 |
kampfer wrote:
I’ve seen this said all over the place, but no one goes into detail explaining why. What are the advantages vs. disadvantages for learning C++ before C#?
Up until now I’ve became curious about how programming really works. What happens underneath it all? What happens when I compile it and run my program?
Is this what they mean by learn C++ first? Will it help me to understand what’s going on more clearly? BTW, I already know C#.
Thanks, John
|
You want to learn C/C++ so that you can understand what C# or VB.Net is doing for you under the covers. .Net languages aren't magic and anything they are doing you could do yourself in C (it would just take a lot more effort).
By understanding C/C++ you will have a much better understanding of what .Net is doing under the covers. This will make it much easier to debug (or better yet avoid) complex problems, especially problems related to memory allocation/deallocation and references.
I don't think you need to be an expert or even have written any production code in C/C++, but you should have a decent understanding of how it works.
I think it would be a good school project (college level anyway) to create an object-oriented architecture in C (v-tables and other basic structures/algorithms). Once you have completed this project and have a good understanding of it, you should never have
to touch C/C++ again

.
I resepectfully disagree. Explicit management of memory is exactly what .Net was designed to get away from, and to help programmers program their code closer to what they want it to do, rather than closer to how the machine ought to do it.
Although I would say that it is good practise to have a full understanding of the architecture of the system that you are programming on, and you'll be a better overall programmer because of it, if starting a task and not a career in programming, just stick
with C# or VB.NET.
If you are going to go down the road of saying you must learn the "underneath" languages, then there is no reason why you should stop at C++; C++ does exception managing in a way that C doesn't, and which you won't fully understand until you learn C, and even
C doesn't tell you everything about memory management that NASM assembler will. And why not learn how a processor and RAM is made up of NAND gates so you can see physically how the system goes, and how you make a NAND gate from plate silicon?
My best suggestion would be for you to learn a .NET language first, and then to learn C++ or the like later, because with .NET you implement an idea, with C++ you build a program, with C you build an error waiting to happen and with NASM assembler you build
a headache. And believe me, with a decade of experience in C and C++, I've never looked back since C#.
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.