Amieltech LLC
Home  ::   FAQs  ::   Docs.  ::   Network products & sign-in

My thinking ...why not just (a)void C++ altogether when C is adequate?

My thinking ...why not just (a)void C++ altogether when C is adequate?


When C++ was first introduced it was described as and called C with classes. Classes were an improvement of the use of C structures that were used to better organize programs written in C prior to the introduction of the new language C plus plus.

For example, structures would not only contain the data as an entity within the program, the structures would also contain address variables for function pointers (member functions or methods in c++). From the design perspective structures corresponded to entities and objects in C++.

All of the the Expat Library (click) which became the basis for all of the XML handling code in commercial web browsers when XML was first introduced and standards were developed is written entirely in C and utilizes function pointers extensively. If you want an example of the programming with structures approach that evolved into popularity  in the middle 90's, roam thru the Expat code sometime.

[update October 20, 2020]   Returning to my roots on this with the use of C++ in a labor called 'Feddoc'; software that does useful stuff with publicly available Government records which some believe might provide insight into what the Government is doing on a daily (literally daily) basis. My thoughts are on the various software means that create value using what the Government provides.

So, by way of confession I am admitting that my relationship with C++ over the years has always been distant. I use C++, but I typically do not conform to many of the 'community standards' that seek to govern the way that developers develop. I believe I have earned that privilege having used C++ since Borland 3.0. 

I will share how my personal bastardization of C++ standards of practice has typically looked; do understand, I am a C programmer with a working  knowledge of assembly, I know computer architecture thus for me It's quite OK to do things that are somewhat non-conformant. My divergence is not because I don't know, my divergence is due to the idea of really knowing. As in; when code is written compiles and runs and performs as designed...there is no problem.