Dialog warn: equivalent in squeak

Bert Freudenberg bert at isg.cs.uni-magdeburg.de
Wed May 28 14:08:24 UTC 2003


Am Mittwoch, 28.05.03 um 15:34 Uhr schrieb Joel Shellman:

>> Actually, "self inform:" is way better.
>>
>> How would creating an explicit dependency to PopUpMenu be better than 
>> a
>> generic message send to self? That is as encapsulated as you can get.
>>
>> The fact that _currently_, generic methods are implemented as instance
>> methods of Object is just a nuisance. The main point is that 
>> currently,
>> any object depends on Object anyway, so no artificial dependency is
>> introduced at all.
>
> Not only are you introducing an artificial dependency, but you are
> introducing a hidden dependency because anyone who uses self inform: 
> will
> now be dependent on PopUpMenu and may not even realize it.

Not so. _My_ code is not dependent on PopUpMenu. Suppose you remove 
PopUpMenu (which you surely might want to do in a non-GUI environment) 
- would you rather go and fix a myriad of places explicitely naming 
PopUpMenu? Or would you rather reimplement Object>>#inform:?

-- Bert



More information about the Squeak-dev mailing list