Path: utzoo!attcan!uunet!husc6!bloom-beacon!oberon!sm.unisys.com!hplabs!hpda!hpcuhb!hpcllla!hpcllca!dmitry From: dmitry@hpcllca.HP.COM (Dmitry Lenkov) Newsgroups: comp.lang.c++ Subject: OOP languages and software reuse Message-ID: <1250001@hpcllca.HP.COM> Date: 23 Nov 88 20:40:38 GMT Organization: HP NSG/ISD California Language Lab Lines: 88 Software reuse is one of the major areas in software development which is gaining more attention nowadays. Object-oriented languages are claimed to support software reuse by their nature. Here come to mind two points recently made in notes. 1. Jim Adcock (HP Lake Stevens, WA) writes: > Code reuse comes with code that was designed > for reuse. Code that was not designed for > reuse cannot be easily reused. Whatever language > one uses, one needs to realize that > reusability has to be a deliberate design > goal for any code to be reused on future > projects. This approach puts emphasis on a full design (possibly object- oriented) and an advance generalization of code planned to be reused later. 2. Ralph Johnson (University of Illinois at Urbana-Champain) writes: > The main reason that o-o programming is so popular is code reuse. > Reusable code is harder to write than other code because, in addition > to being correct, it must be reusable. The only way to see whether or > not code is reusable is to reuse it. If some classes will work in > three previous projects then they are more likely to be reusable than > classes that have only been used in one project, which is one of the > reasons why reusable code is usually a result of generalizing from > earlier projects. I believe it is code reuse that makes the iterative > life-cycle model so important to object-oriented programming. The iterative life-cycle model is often associated with the object- oriented design by prototyping. With this respect, here is an approach which suggests the design process of reusable code as a dynamic generalization from the prototyping phases of several parallel projects (ignoring the time factor) or subprojects within the same project. It is interesting that the above approaches, while being very different in their nature, both concentrate on the design phase. So it does probably help when one designs reusable software if he has a design tool supporting the object-oriented programming paradigm or an object-oriented prototyping language. However: 1. Does one really need an object-oriented implementation language ? 2. What particular features of object-oriented languages help an implementation of reusable software after it has been designed to be reusable ? Those questions deal with the case when the software has been designed to be reusable. Let us consider a different situation. Suppose someone was to assemble a system from existing pieces of software implemented in the same programming language. For example, he needs to reuse the text editor part of a window-oriented text editor with a different windowing package, or he needs to build a compiler front-end from the parser and lexical analyzer of one compiler, semantic analyzer of another compiler, and symbol table package of yet another one. Questions: 3. Will it help if the existing pieces of software are written in an object-oriented language comparing with the languages like C or Pascal ??? Or one will glue those pieces by writing whatever code is necessary as usual. 4. Wouldn't it even be harder at least for some object-oriented languages because of more restrictive rules for changing interfaces ? Yet another aspect of software reuse comes from the fact that there already exists large amount of software written in non-object-oriented languages and not designed to support the object-oriented programming paradigm. In regard to that: 5. Is there any reasonable approach which would allow to reuse this software either by pieces incorporated into new software or at the system level by integrating it into object-oriented or object-based environments, or do we have to limit the scope of applications of object-oriented programming techniques to new software developments only ? ANY OPINIONS AND THOUGHTS ??? | | Dmitry Lenkov (HP), dmitry@hpcllca |