Sunday 14 February 2016

The Three Hierarchies of C++

Lest anyone ever tell you programming isn't complicated, it occurred to me that a C++ program has three interlocking, but independent hierarchies.

  • Namespace: The name of the function, within its parent namespace and/or the class that owns it.
  • Call Stack: The parent is the calling function, the child is the callee.
  • Inheritance: The class/struct is a child of the base class.

Could we stand to lose one or two of these?

No comments:

Post a Comment