Kaptaan Jack@lemmy.ml to Programmer Humor@lemmy.ml · 1 year agoProgramming Languageslemmy.mlimagemessage-square76fedilinkarrow-up129arrow-down14file-text
arrow-up125arrow-down1imageProgramming Languageslemmy.mlKaptaan Jack@lemmy.ml to Programmer Humor@lemmy.ml · 1 year agomessage-square76fedilinkfile-text
minus-squareHazzia@discuss.tchncs.delinkfedilinkarrow-up0·1 year agoI’m not too familiar with C, but I was under the impression that C++ was deceloped as a superset to C, and was capable of everything C could do. Is that not the case?
minus-squareabessman@lemmy.worldlinkfedilinkarrow-up1·1 year agoI mean yeah, if you restrict yourself to the C part of C++ it can do everything C can. But then you’re not getting any of the advantages of C++. Once you start using things like classes and templates heavily, your program will quickly outgrow low-end hardware.
minus-squareRet2libsanity@infosec.publinkfedilinkarrow-up1·1 year agoCompile a c program with gcc then with g++. You will quickly see the difference in size
I’m not too familiar with C, but I was under the impression that C++ was deceloped as a superset to C, and was capable of everything C could do. Is that not the case?
I mean yeah, if you restrict yourself to the C part of C++ it can do everything C can. But then you’re not getting any of the advantages of C++.
Once you start using things like classes and templates heavily, your program will quickly outgrow low-end hardware.
Compile a c program with gcc then with g++.
You will quickly see the difference in size