Object-oriented operating systems prefer to consider every data structure as an object. However, data structures predefined by the hardware's manufacturer do not fit into this scheme. First of all, traditional object-oriented languages do not support objects with user-defined representation, which would be needed to these data structures as objects. Secondly, classic object-oriented languages have an overhead unacceptable for operating systems. To overcome both problems we introduce predicate classes into C as an extension of the standard structures. Inheritance is based on overlapping reserved fields without extending the object in size, which enables polymorphism by value, a very important feature in system programming. Dispatcher routines of methods add no significant overhead compared to standard C.
展开▼