[KCP] SystemChangeNotifications: Current state and some code

Roel Wuyts wuyts at iam.unibe.ch
Fri Jul 25 21:13:30 UTC 2003


Again, you cannot call the 'events' ClassChanged (which would be a very 
clear name) because it works not only for classes but for all kinds of 
items. So you could call it an 'ItemChanged', 'ItemRenamed', etc.

On Monday, Jul 21, 2003, at 17:40 Europe/Zurich, Colin Putney wrote:

>
> On Tuesday, July 15, 2003, at 08:49  AM, Martin Wirblat wrote:
>
>>>
>>> Event
>>>   CodeModified
>>>      ClassChanged
>>>      ClassRenamed
>>>      ClassAdded
>>>      ClassRemoved
>>>      MethodAdded
>>>      MethodRemoved
>>
>> These names are misleading because one wouldn't think that such
>> classes are events.
>
> I would. Based on their names, what else could they possibly be?
>
>>> This exact issue has come up recently on the list with the
>>> introduction of the Deprecation exception. That class was originally
>>> called DeprecatedException. This, I hope you agree, does not match
>>> the feel established by the ANSI exceptions: DivideByZero and
>>> MessageNotUnderstood, Halt.
>>
>> DivideByZero, MessageNotUnderstood and Halt imply or suggest some
>> sort of Error. There is a difference!
>
> No more than ClassRemoved suggests an event.
>
> What's not really clear here is the difference between exceptions and 
> events, which is the delivery mechanism. Both MessageNotUnderstood and 
> ClassAdded are "events" in the broad sense of the term; programmer 
> familiar with the Smalltalk idiom will infer that if he encounters an 
> instance of one of these classes, the event must have occurred at some 
> point in the past, and that the instance encapsulates the details of 
> where and when. It does not tell him that one will be delivered to an 
> #on:do: handler somewhere up the stack, and the other will be 
> delivered to a callback method of the dependents of a certain object.
>
> The good news is that if he wants to know about the delivery 
> mechanism, he doesn't have to look far. Seeing the MNU is a subclass 
> of Exception, while ClassAdded descends from Event will give him the 
> clue he needs.
>
> In short, I like the shorter names.
>
> Colin
>
>
Roel Wuyts                                                   Software 
Composition Group
roel.wuyts at iam.unibe.ch                       University of Bern, 
Switzerland
http://www.iam.unibe.ch/~wuyts/
Board Member of the European Smalltalk User Group: www.esug.org



More information about the Squeak-dev mailing list