Newsgroups: comp.lang.c++,comp.object,comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!news.mathworks.com!uunet!mole-end!mat
From: mat@mole-end.matawan.nj.us
Subject: Re: Teaching OO
Message-ID: <1995Jan13.060735.19034@mole-end.matawan.nj.us>
Summary: Means and Ends
Organization: :
References: <1994Dec26.162401.6570@rcmcon.com> <RFR0lOfN33q2071yn@IIA> <1995Jan11.143449.24323@rcmcon.com>
Date: Fri, 13 Jan 1995 06:07:35 GMT
Lines: 50
Xref: glinda.oz.cs.cmu.edu comp.lang.c++:107259 comp.object:24986 comp.lang.smalltalk:19499

In article <1995Jan11.143449.24323@rcmcon.com>, rmartin@rcmcon.com (Robert Martin) writes:
> bfelton@ibm.net writes:
 
> >>>rmartin@rcmcon.com (Robert Martin) writes:
 ...
> Bill Said:
 ...
> Bob Said:
 ...
> Bill Said:
 ...
[Bob saith]
> Remember, maintenance is a form of reuse, since you are changing the
> application and then asserting that all the unchanged code can be
> reused in the changed context.
  ...
> >>What is
> >>the goal of OOD?  What benefits are we trying to gain.  
> 
> >How to design useful objects.  
> 
> Why objects?  Why not just useful code?
> 
> >The benefits of encapsulation,
> 
> What are the benefits of encapsulation, if not the management of
> dependency?
> 
> >inheritance, polymorphism, 
> 
> Why these two?  You have named mechanisms but no motivation.  Why do
> you name inheritance and polymorphism as benefits and goals?

Let's put it in a different way: Malleable and reusable code ought
to be the goal.  The means to these include separation of concerns,
encapsulation, decoupling, achievement of high cohesion, etc.

Inheritance and various kinds of polymorphism are means to _those_.

> >and, yes, reuse.  But reuse last.

As Bob states, the first form of re-use is re-use in the next release.

Believe it!  If your code can't pass this test for re-use, it won't pass
many other tests.
-- 
 (This man's opinions are his own.)
 From mole-end				Mark Terribile
 mat@mole-end.matawan.nj.us, Somewhere in Matawan, NJ
	(Training and consulting in C, C++, UNIX, etc.)
