OO and Opportunities for Software Evolution Dewayne E. Perry AT&T Bell Laboratories 600 Mountain Avenue Murray Hill, NJ 07974 There are a number of features of object-oriented languages that present opportunities for easing the problems of evolving software systems. As with most language approaches, there are also opportunities for creating additional problems. The extent to which programmers adhere to the former and avoid the latter will determine the extent to which problems are solved or created. o Encapsulation OO languages provide an encapsulation mechanism that enables programmers to package related types, data and methods together. This enables the programmer to develop domain-specific partitions of the system within which to localize changes and to limit their impact. Of course, the usual dependencies on external encapsulations are still there and these are sources of semantic changes that affect the internal structure of the component. With proper partitioning, however, these dependency problems are more intellectually manageable. o Data Abstraction One gains two benefits from data abstraction mechanisms. The first results from the emphasis on the importance of data as an organizing and design principle. This organizing principle provides an important rationale for the partitioning mentioned above. The second benefit results from the ability to build firewalls which limit a large class of currently existing dependencies -- namely, those which depend on the internal structure of data that may change over the life of a system. o Inheritance Inheritance is a very powerful mechanism and as such is both useful and dangerous. One of the primary benefits of inheritance in organizing and partitioning a system is that it provides a valuable means of constructing a conceptual hierarchy -- that is, of defining the conceptual dependencies among various components of a system. The downside is that changing this hierarchy will have serious as well as subtle effects on the entire system. One of the primary benefits of inheritance is the ease of using exiting components as the basis for specialization. This is the much-touted ``reuse'' of code in OO programming. Here again, there are opportunities as well as dangers. The extent to which the power of inheritance and its various facilities are carefully managed determine the amount of retesting that must be done (see, for example, Dewayne E. Perry and Gail E. Kaiser, ``Adequate Testing and Object-Oriented Programming'', Journal of Object-Oriented Programming, January-February 1990) when reusing previously existing components. o Overloading Often called ``polymorphism'', overloading is a mechanism for establishing the correct interpretation of analogous concepts dependent on their context and signature. The primary advantage is the reduction of program name space to that of the conceptual name space. This reduces the amount of effort needed in building and maintaining ones mental model of the system. This in turn makes it easier to understand various parts of the system because of the analogous nature of those parts.