Path: utzoo!utgpu!water!watmath!clyde!att!rutgers!mit-eddie!husc6!linus!sdl
From: sdl@linus.UUCP (Steven D. Litvintchouk)
Newsgroups: comp.lang.smalltalk
Subject: Re: Software Reuse
Message-ID: <39102@linus.UUCP>
Date: 20 Aug 88 20:27:24 GMT
References: <550@dcl-csvax.comp.lancs.ac.uk>
Organization: The MITRE Corp., Bedford, MA
Lines: 57
In-reply-to: neil@comp.lancs.ac.uk's message of 10 Aug 88 11:14:32 GMT


In article <550@dcl-csvax.comp.lancs.ac.uk> neil@comp.lancs.ac.uk (Neil Haddley) writes:

> The point at issue:
> 
> "The Inheritance mechanism of Smalltalk and other Object-Oriented
> programming languages provides significant support for code level
> Software Reuse"
> 
> My current tentative opinion is that this is in fact not the case. 
> 
> Although it does allow for nice structuring of code, through the use of
> Abstract Classes etc, it does not provide any advantage over other code
> level reuse mechanisms, such as Generic Abstract Types.

Disagree.  Read the paper, "Genericity vs. Inheritance," by B. Meyer
(OOPSLA '86).

The nice thing about inheritance is that one can do "differential
programming."  That is, each newly designed abstraction can inherit
all the code of a previous abstraction, but also contain some
modifications or enhancements.  Abstractions can be made to smoothly
evolve from one another; and each intermediate form along the
evolutionary path is available for future reuse.

I have been programming in Ada, developing generic abstract types, for
about 5 years.  The problem with generics is that differential
programming is difficult.  If you want to develop a generic
(parameterized) ADT, you must decide a priori what the generic
parameters are.  Once you have done this, all you can do is
instantiate the generic in various ways.  If you decide later that the
generic ADT needs further modification to support reuse, then you must
either:

  -- physically modify the ADT code to add additional generic parameters
     (probably invalidating all your existing instantiations).

  -- develop a new generic ADT (with additional generic parameters),
     based on the existing generic ADT.  But the new generic ADT must
     also have all the original generic parameters from the original
     ADT.

In either case, the number of generic parameters thus tends to grow
over time; I've got Ada generics with twenty or thirty generic parameters!


Steven Litvintchouk
MITRE Corporation
Burlington Road
Bedford, MA  01730

Fone:  (617)271-7753
ARPA:  sdl@mitre-bedford.arpa
UUCP:  ...{cbosgd,decvax,genrad,ll-xn,mit-eddie,philabs,utzoo}!linus!sdl

	"Those who will be able to conquer software will be able to
	 conquer the world."  -- Tadahiro Sekimoto, president, NEC Corp.