Object-oriented Programming with Dynamic Classification in C#

L. Li and W. Wang (Canada)


Dynamic classification, object hierarchy, objectoriented programming, preprocessor, programming language.


Object-oriented programming is popular but the major object-oriented programming languages such as Smalltalk, C++, Java, and C# support only static classification but not dynamic classification. With static classification we mean during an object's life span, the object belongs to only one class from which the object was created. In real world applications, we need to support entities that take on roles of different classes and get rid off the roles dy namically. The feature of dynamic classification in object oriented programming enables an existing object to be classified into and declassified from various classes at runtime. Here, we present an approach to dynamic classifica tion in C# programming. The approach unifies the notions of object and role and extends a traditional class hierarchy with a relation of dynamic classification between classes. We show how to implement the approach in the C# lan guage by presenting a prototypical preprocessor that translates C# code using the dynamic classification fea ture to the standard C# code, which can be compiled by the C# compiler.

Important Links:

Go Back