Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!nntp.club.cc.cmu.edu!goldenapple.srv.cs.cmu.edu!das-news2.harvard.edu!news.dfci.harvard.edu!camelot.ccs.neu.edu!news.mathworks.com!rill.news.pipex.net!pipex!blackbush.xlink.net!ins.net!heeg.de!uucp
From: Hasko Heinecke <hasko@heeg.de>
Subject: Re: Stylistic Aside (was: counting in smalltalk)
Content-Type: text/plain; charset=us-ascii
To: tkc@bmi.net
Message-ID: <334A42DF.1CFBAE39@heeg.de>
Sender: uucp@heeg.de
Content-Transfer-Encoding: 7bit
Organization: Georg Heeg - Object-Oriented Systems
References: <859822164.1589@dejanews.com> <33413E5C.77@fedex.com> <33430A20.76C6@bmi.net>
Mime-Version: 1.0
Date: Tue, 8 Apr 1997 13:06:39 GMT
X-Mailer: Mozilla 3.01Gold (X11; I; SunOS 4.1.3 sun4c)
Lines: 38

Travis Griggs wrote:
> 
[...]
> I was taught in my early Smalltalk days to stay clear of objects that
> ended in "er" since they implied verb/procedures as opposed to
> noun/data. Though its all just semantics, I have found this to be
> helpful in reminding *me* of the data-centric approach espoused by
> Smalltalk. So I would personally call the above object a CustomerSet |
> CustomerBase | CustomerGroup | or something like that.
[...]

Although I agree in genreal, I find cases where an 'er' object is
needed. Most are converter classes that have to maintain some state in
order to convert object networks into other object networks.

E.g. converting a Smalltalk Text into HTML can be different depending on
wether it stands for itself or it's part of a larger entity.

OK, you could create two methods: #convertLonelyText and #convertAsPart.
But then you get the double dispatching problem with more and more
methods as the number of contexts rises.

Having a group of converter or compiler classes seems to be a more
elegant solution. Bottom line is: An activity specification _can_ be an
object but usually shouldn't.

> 
> --
> Travis or Kerrin Griggs
> Key Technology   (509) 529-2161
> tkc@bmi.net         (509) 527-8743

Hasko
-- 
+------------------------------------------------------+
| Hasko Heinecke, Georg Heeg - Object-Oriented Systems |
| mailto:hasko@heeg.de or try http://www.heeg.de/      |
+------------------------------------------------------+
