Implementing the First-Class ADT Pattern
In this lesson, we will explain the implementation of the First-Class ADT pattern in the C language.
We'll cover the following...
Definition of a FIRST-CLASS ADT
ADT stands for Abstract Data Type and it is a set of values and operations on these values. When we have many unique instances of ADT, it is considered first-class.
It is similar to the interface listed example mentioned in the previous section. However, the data type in the example is not abstract as it fails to hide its implementation details. To make ADT truly abstract, we have to utilize a powerful feature of C: the ability to specify incomplete types.
Incomplete types
The ...