Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any reason a .Net windows programmer needs to learn C or C++ anymore?

Tags:

c++

c

.net

Can someone describe what advantages a C or C++ programmer would have over a .Net programming when developing for Windows?

like image 318
ajl Avatar asked Feb 26 '10 04:02

ajl


People also ask

Do programmers still use C?

Despite the prevalence of higher-level languages, the C programming language continues to empower the world. There are plenty of reasons to believe that C programming will remain active for a long time. Here are some reasons that C is unbeatable, and almost mandatory, for certain applications.

Is .NET worth learning 2022?

Is C# worth learning in 2022? C# is being integrated into every platform, including desktop, online, future technologies, gaming, and services. So, absolutely, you should study C# right now since it will offer you the best chance of getting in and will keep you employed as you advance in your career.

Do you need to know C to be a programmer?

Most of the theories related to computers like Computer Networks, Compiler Designing, Computer Architecture, Operating Systems are based on C programming language and requires a good knowledge of C programming if you are working on them.

Should I use C or CPP?

Compared to C, C++ has significantly more libraries and functions to use. If you're working with complex software, C++ is a better fit because you have more libraries to rely on. Thinking practically, having knowledge of C++ is often a requirement for a variety of programming roles.


2 Answers

There's a saying that every sufficiently complex C application ultimately ends up reimplementing parts of C++. The same goes with C++ programs and higher languages. Learning C and C++ will indirectly make you a better programmer by helping you gain a deeper understanding of how .Net actually works, and why the designers made the choices they made.

A programmer is only as good as his understanding of the layers beneath him. .Net does a pretty good job of abstracting a lot of machine architecture issues out of view, but it's not perfect. There are still leaks in the abstraction layer where an understanding of lower-level issues will help you make good decisions at the .Net layer.

A short, incomplete list of these issues includes:

  1. Interop with native code, especially with the Windows API
  2. CPU cache coherency (if you don't believe me, google the slides from the PLINQ presentation at PDC '09)
  3. Value type performance vs. Reference type performance (this is firmly footed in the .Net world, but learning C/C++ makes the differences between stack and heap allocations more explicit in some ways).
  4. Kernel scheduling issues (i.e. why it's a bad idea to spin off 1000 threads)
  5. Understanding the garbage collector is also best achieved by writing a few memory management schemes in non-garbage collected languages.
like image 58
Kennet Belenky Avatar answered Oct 17 '22 17:10

Kennet Belenky


You should learn enough C to be comfortable with the native Windows API, as it's quite handy when writing complicated UI and when interacting with the system.

like image 42
SLaks Avatar answered Oct 17 '22 16:10

SLaks