In C++, you might define an abstract base class with virtual functions and implement types as subclasses thereof, or you might do a COM-style interface thing so you can pass pointers to data objects into extensions in dynamically-linked libraries2 ??? and escape the one-base-class-to-rule-them-all straitjacket.