What's so special about programming in C++? What's wrong with just plain C?
C is procedural and C++ is object-oriented. The latter means it is much easier to write black-boxes which you can test and debug in isolation and then plug together with other black-boxes, assuming you've got the interface design right between them.
I think I have just had a light-bulb moment.
I was thinking about the general principles of how multiple disparate developers could contribute code modules to FreeCAD - as a child of the procedural code age, where you write loops to scan for input and then invoke routines to handle the input and then do something as a result of it, the likes of FreeCAD where the primary input is a mouse click is simply mind boggling, and one could not just add some more code to it willy-nilly. Every mod would have to be woven into the rest.
Take for example adding a tool to the tool bar which enables the creation of a b-spline curve in a sketch. First you need an icon added it the tool bar and an equivalent item on the edit menu. Then you need to interpret the mouse movement and clicks so that when the tool is active visual feedback is provided to the user, and then the parameters for the created curve need to be stored in the design file and presented on screen (pre-mod, the software doesn't know how to interpret a b-spline in the design file). When the sketch is then rendered into a solid by extrusion or revolution, the existing mesh generator needs to be told how to calculate the coordinates of the mesh nodes for those elements that are controlled by the b-spline (and it doesn't know how to do that).
Correct me if I'm wrong, but I think the business of reacting to mouse movement and clicks etc is handled by using a "visual" language so that everything is event-driven, and the management of events is off-loaded to the operating system.
Object orientation comes in with the black boxes prpr mentioned. The language provides a standard interface so that, for example, the mesh generator doesn't need to know how to calculate b-splines - all it needs to know is the steps required to calculate the mesh, and the language's supervisory system passes the specific calculations required to render a b-spline to the b-spline module. Therefore, in order to add a b-spline function to the sketch editor, all that is needed is a list of procedure calls from the other modules that will need to be supported. I believe these are called "methods".
It strikes me that the language compiler must therefore be adding a huge amount of additional code to the executable that is not explicitly written by the programmer, but needs to exist as another level of "operating system" to support and manage the code that has been explicitly written. Hopefully the compiler is intelligent enough not to put in support for functions which are not required in any particular case!
Have I got that about right?