The poor C++ guy (Re:C++ vs C)
Posted: Mon Sep 18, 2006 3:55 am
Some random thoughts on the subject:
People are sortof forgetting their own individual taste for style. Some people prefer thinking in objects, communication and top-down approaches, while some prefer writing small stubs expected to become part of a larger whole, and it is this preference that should be an important part in the C/C++ decision.
After all, you can do in C++ what you can do in C, and vice versa. (expects the horrible difficulty argument here)
And although i dont want to favour one language over the other, I know somebody that "said" he was a c++ programmer. Pretty sad story to be honest, but i think its good to know.
He always complained about the same thing: after getting past about ~50 lines his code started to randomly generate segmentation faults and other unexpected behaviour, and he seemed to be completely unable to trace it. In the end it always came out that he had been messing with pointers in some way, so that his objects were either wiped, lost or somewhere you wouldnt want them.
Since he couldnt seem to figure what he was actually doing, i tried to tell him to use a less forgiving language so that he could learn whatever was happening, as well as some system architecture. So i told him that he should do his next few attempts in C (for being C++ minus the things he kept messing up) in the hope he would figure what was going on, but he refused.
In the end he became so frustrated that he quit programming altogether.
The point here is that higher languages might be easier, they sometimes attempt to hide the mechanisms of the underlying system. So for those wanting to program C++, you should know very good what it does between two lines of code. (same goes for every language, but since C is pretty close to the hardware, C++ is a big step in comparison)
In summary, both languages will do, but you must be able to properly operate whichever one you choose.
That IMHO is also the main reason for the "C for OSes" thinking, since its less difficult to know the likes of C than of C++
People are sortof forgetting their own individual taste for style. Some people prefer thinking in objects, communication and top-down approaches, while some prefer writing small stubs expected to become part of a larger whole, and it is this preference that should be an important part in the C/C++ decision.
After all, you can do in C++ what you can do in C, and vice versa. (expects the horrible difficulty argument here)
And although i dont want to favour one language over the other, I know somebody that "said" he was a c++ programmer. Pretty sad story to be honest, but i think its good to know.
He always complained about the same thing: after getting past about ~50 lines his code started to randomly generate segmentation faults and other unexpected behaviour, and he seemed to be completely unable to trace it. In the end it always came out that he had been messing with pointers in some way, so that his objects were either wiped, lost or somewhere you wouldnt want them.
Since he couldnt seem to figure what he was actually doing, i tried to tell him to use a less forgiving language so that he could learn whatever was happening, as well as some system architecture. So i told him that he should do his next few attempts in C (for being C++ minus the things he kept messing up) in the hope he would figure what was going on, but he refused.
In the end he became so frustrated that he quit programming altogether.
The point here is that higher languages might be easier, they sometimes attempt to hide the mechanisms of the underlying system. So for those wanting to program C++, you should know very good what it does between two lines of code. (same goes for every language, but since C is pretty close to the hardware, C++ is a big step in comparison)
In summary, both languages will do, but you must be able to properly operate whichever one you choose.
That IMHO is also the main reason for the "C for OSes" thinking, since its less difficult to know the likes of C than of C++