Menu
Home Explore People Places Arts History Plants & Animals Science Life & Culture Technology
On this page
Singly rooted hierarchy

The singly rooted hierarchy, in object-oriented programming, is a characteristic of most (but not all) OOP-based programming languages. In most such languages, in fact, all classes inherit directly or indirectly from a single root, usually with a name similar to Object; all classes then form a common inheritance hierarchy.

This idea was introduced first by Smalltalk, and was since used in most other object-oriented languages (notably Java and C#).

A notable exception is C++, where (mainly for compatibility with C and efficiency) there is no single object hierarchy. This feature is especially useful for container libraries - they only need to allow putting an Object in a container to allow objects of any class to be put in the container. Containers in C++ have been implemented with multiple inheritance, and with help of template-based generic programming by Bjarne Stroustrup. Other object-oriented languages without a singly rooted hierarchy include Objective-C and PHP.

We don't have any images related to Singly rooted hierarchy yet.
We don't have any YouTube videos related to Singly rooted hierarchy yet.
We don't have any PDF documents related to Singly rooted hierarchy yet.
We don't have any Books related to Singly rooted hierarchy yet.
We don't have any archived web articles related to Singly rooted hierarchy yet.

See also

References

  1. Bruce Eckel, Thinking in C++ vol. 2, Ch. 9 "Multiple inheritance": section "Perspective"

  2. MFC Programmer's SourceBook : Thinking in C Archived 2007-11-13 at the Wayback Machine http://www.codeguru.com/cpp/tic/tic0246.shtml

  3. Bruce Eckel, Thinking in C++ vol. 1, Ch. 16 "Introduction to Templates": section "The template solution"