Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!newsfeed.pitt.edu!gatech!news.mathworks.com!uunet!in2.uu.net!nntp.cadence.com!news
From: Simon Kinahan <simonk@cadence.com>
Subject: Re: Pointers to functions
Content-Type: text/plain; charset=us-ascii
Message-ID: <3134A17E.6E9E@cadence.com>
Sender: news@Cadence.COM
Content-Transfer-Encoding: 7bit
Organization: Cadence Design Systems
References: <4ggn8h$f1m@harbinger.cc.monash.edu.au> <4ghkk5$sbi@m1.cs.man.ac.uk>
Mime-Version: 1.0
Date: Wed, 28 Feb 1996 18:39:58 GMT
X-Mailer: Mozilla 2.0 (X11; I; SunOS 5.3 sun4m)
Lines: 12

Ivan Moore wrote:

> A good solution is to use a dictionary mapping keywords to blocks.
> If you want the code in the block to send messages to a particular
> object, just have the block taking an argument.

I'd vote for this solution. I much prefer people who are trying
to write reusable code to use blocks rather than message identifiers.
It is very annoying to try to use two classes together and discover
that one of them expects to be able to send a message to the other,
and you need it to use a block, becuase you don't want to add a menthod
to the other class.
