What's a C++ student's biggest weakness that holds him back?


 

What's a C++ student's biggest weakness that holds him back?

C++ is the student’s biggest weakness. C++ has taught the student old and primitive programming. The C++ student must grapple with a whole lot of issues, traps, flaws, and undefined behaviour that NO programmer should have to deal with.


The C++ is a system language. Even for a really good system language, system languages have details that should be abstracted from general programming, since it is the job of system programming to deal with those details. This is because good architecture is layered to separate concerns.


Separation of concerns is one of the most important concepts in computing. It is abstraction. C and C++ fail to separate concerns.


With poor lessons like that, the issues of flawed baggage, and system baggage, C++ is a huge encumbrance to learning programming. All you learn with C++ is C++. C++ demands knowing far more about the design and evolution of the language more than any other language. Other languages take a back role in allowing the programmer to express their problems and solutions. C++ puts itself at centre stage. Another very poor lesson.


One way it does that is also insisting that programmers understand a low-level machine model that C++ exposes — you can see that in Chris Reid’s answer. Languages should have an ideal and high-level machine model. Languages should take care of those low-level details. Low-level details result in programs that are difficult to reason about (an essential of programming) and inflexible, locked in software. C and C++ are good at locking in software to a platform and to themselves.


C and C++ focuses programming on the container, rather than the contents. Yes, system programming is about the container, or computing, and that level of programming is lots of fun and satisfying (I spent most of my career at that level), but programmers should concentrate on the contents — that is the data, nature of the data (possible values defined by types), and applicable operations on that data. Programmers should not focus on locations (addresses), and access paths. The container level is exposed by C pointers (C++ tries to fix up with smart pointers, but then programmers must understand that and the evolution, and avoid raw pointers for new developments).

Plus récents Le plus ancien