[ENH] SpeakerMorphCleanup ( [er][sm] naa... )

Stephane Ducasse ducasse at iam.unibe.ch
Tue Aug 12 17:18:10 UTC 2003


Hi

>> Changes (x isKindOf: SpeakerMorph) to (x respondsTo: #stopSound)
>
> I don't like this much. Referring to a method instead of to the class 
> doesn't
> lose the dependency, it just makes it more obscure.

I agree with daniel. originally I liked the idea because it allows one 
to pass an object with a compatible interface, but daniel is right.

> I think fixing this right will require finding the design intention, or
> some eToys mechanism I don't know about to do right (I don't know
> if players give customs notifications when scripts stop, or something
> like that).
>
> I started looking at the sound stuff. I liked what I saw there, but it 
> isn't
> trivial, it'll take me a while.

I take the opportunity to raise this CRUCIAL issue: this is 
***really*** important that we
in general realize that using reflective/introspective facilities 
(isKindOf,
canUnderstand:, instVar, respondsTo:, perform:, doesNotUnderstand:, 
....., Smalltalk at: ifAbsent:
to a certain extend too, changeClass:, become:...) should be avoided as 
much as possible for applications that are not tools.

respondsTo;, canUnderstand:, isKindOf are the sign of poor design.

So please to not take my point in the wrong, ****continue**** to clean 
Squeak, it deserves it. Cleaning is not fun I know that (after people 
complain ;)), but when the stuff is done this is a good feeling.

Stef
> Daniel
>
>
>
>
>
>
>
>
>
>
>
>
> < I'm a bug-fixing machine! >
>
> This post brought to you by the BugFixArchiveViewer, a handy tool that
> makes it easy to comment on proposed fixes and enhancements for Squeak.
> For more information, check out the Web page for the 
> BugFixArchiveViewer
> project: http://minnow.cc.gatech.edu/squeak/3214
>
> < I'm a bug-fixing machine! >
>



More information about the Squeak-dev mailing list