No Hungarian Notation in Smalltalk - was [KCP]
Event notification call for feedback
Roel.Wuyts at ulb.ac.be
Wed Nov 5 10:01:03 UTC 2003
yes, I use #trigger: in my implementation. The existing event mechanism
(by John Sarkela) that I use uses #triggerEvent:with: .
On Tuesday, Nov 4, 2003, at 16:27 Europe/Zurich, Michael Rueger wrote:
> Brent Pinkney wrote:
>> You are arguing that we should change the name of
>> MessageNotUnderstood to MessageNotUnderstoodException or
>> ExceptionMessageNotUnderstood. Surely by extension we chould change
>> Integer to ClassInteger ans String to ClassString ?
> No, because an the integer class is still about integers, whereas the
> ClassRenameEvent is an even, not a class rename.
>> Secondly, from an aeththesic perspective there is something elegant
>> and colloqiual about
>> [ x /y ] on: DivideByZero do: [ self inform: 'oops' ]
>> that is lost if we decend into _CODE_ **
>> [ x /y ] on: ExceptionDivideByZero do: [ self inform: 'oops' ]
> Allow myself to differ here. If you read this aloud
> [ x /y ] on: DivideByZeroException do: [ self inform: 'oops' ]
> it speaks (small-talk) to you ;-)
> That's why it *is* important to be very careful with names, that's
> where I definitely agree with you.
>> self triggerEvent: #renameClass
>> with: (RenameClass class: aClass newName: aNewClassName).
> The problem by leaving out the Event suffix is that you can't tell
> whether RenameClass is the event or just the argument to an event
> created in the triggerEvent method itself. In that sense the above
> code is already duplicating semantics.
> self triggerEvent: (RenameClassEvent class: aClass newName: aClassName)
> or even
> self trigger: (RenameClassEvent class: aClass newName: aClassName)
> would avoid that.
> Just my non-native TC ;-)
roel.wuyts at ulb.ac.be Université Libre de
Board Member of the European Smalltalk User Group: www.esug.org
More information about the Squeak-dev