HCCL was developed to enhance the C++ object-oriented programming (OOP) environment. OOP is a style of programming in which data concerning an entity and associated procedures (methods of query and operation ) are encapsulated in a "black box", called an object. This is different from conventional programming method, where procedures and data structures are treated as different entities. Each object in OOP is an instance of some class, and classes are all members of a hierarchy of classes united via inheritance relationships. One of the main advantages of OOP is that development time and effort can be greatly reduced through the use of reusable code. This is because programmers no longer have to spend their time in coding something which is provided in a reusable library. This works well providing that code placed into a reusable library has been well tested. In this case, the only bugs introduced are those that arise from the new code that is built on the reused components.
C++ was chosen as the base language of HCCL because it is currently the most popular object-oriented language. Although C++ has many OOP features, it also has its difficulties. One of the main limitation of C++ is caused by its strongly enforced typing conventions. Objects of different types may not be treated interchangeably, or at the most, they maybe interchanged only in very restricted way. Thus support for keeping objects of different classes in the same container (heterogeneity) does not come naturally in C++. Although it is easy to implement a linked-list in C++ to hold a single class of object, it is not possible to implement a list to store heterogeneous objects directly. For C++ programmers: Generic pointers (pointer to void) cannot be used for this purpose. Although a list may be constructed with such pointers, there is no way to retrieve elements from it because generic pointer cannot be dereferenced. Moreover, a generic pointer has no way of knowing how much memory is required to store the information of an object that it points to.
Since there is no direct approach to implement a heterogeneous container,
an indirect method has to be found to create a HCCL. There are eight main
classes in HCCL: entity, element, pair, container, bag, set, relation,
and function. However, only five of them are container classes. The rest
of the classes such as class entity, class element, and class pair serve
as the auxiliary classes to build the containers. All of these classes
are used to create objects with different but complimentary behaviors.