Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!news.sprintlink.net!europa.chnt.gtegsc.com!news.kreonet.re.kr!news.dacom.co.kr!news.uoregon.edu!psgrain!qiclab.scn.rain.com!slc.com!servio!news
From: cohenb@slc.com (Bruce Cohen)
Subject: Re: Purpose of inheritance in Smalltalk (Was: Re: a Vector subclass goes where?)
In-Reply-To: kentb@ix.netcom.com's message of 15 Nov 1995 15:40:31 GMT
Message-ID: <COHENB.95Nov16132508@topdog.slc.com>
Lines: 23
Sender: news@slc.com (USENET News)
Nntp-Posting-Host: topdog
Reply-To: cohenb@slc.com
Organization: GemStone Systems, Inc.
References: <47odg1$664@canton.charm.net> <47vnbq$tml@watnews2.watson.ibm.com>
	<487qpv$13v@news.jf.intel.com> <4883qa$77b@ixnews5.ix.netcom.com>
	<488csv$6n3@news.jf.intel.com> <48d1lf$ftt@ixnews7.ix.netcom.com>
Date: 16 Nov 1995 21:25:08 GMT

In article <48d1lf$ftt@ixnews7.ix.netcom.com> kentb@ix.netcom.com (Kent Beck ) writes:

> Superclasses that only provide you with "self subclassResponsibility"
> for implementations muddy the waters and don't buy you anything early
> in development. I implement flat (all subclasses of Object), then
> factor a superclass when I can't stand copying and pasting methods any
> more.

What they buy you is that you don't get a lot of nasty little cut and
paste errors ("oops, should have made that super instead of self", or
"damn, now I need to add another instVar").  My style is a mix;
sometimes it's obvious what the superclass is right off and I go with
that; sometimes Object makes sense until I figure out what the thing
really is (and sometimes it stays there).

But you're right, factoring and refactoring are things you can always
do.  And refactoring should, IMHO, be considered a standard part of
reuse.
-- 
-----------------------------------------------------------------------------
Bruce Cohen, GemStone Systems, Inc.              |   email:  cohenb@slc.com
15400 NW Greenbrier Pkwy, Suite 280              |   phone: (503)690-3602
Beaverton, OR USA 97006                          |   fax: (503)629-8556
