A lurkers ravings (was RE: Smalltalk beep -> XXX beep?)

sourcery squeak-dev.sourcery at forum-mail.net
Wed May 14 08:59:05 UTC 2003


On Tue, 13 May 2003 11:21:49 +1000, Russell Penney <rpenney at genesyslab.com> 
wrote:

> I disagree.
>
> Why is beep in Object at all? All the objects in Squeak don't need to
> know how to beep. The sound system needs to know how to beep.
> It seems to me that this is the reason Squeak is spaghetti code in the
> first place, people aren't sure where to put something so it goes in
> object and now us newbies cant find anything or figure out what to use.
> Plus you are teaching us bad object design habits! :-)
>
> IMHO AbstractSound should be in the Kernel with the base methods
> (beep,etc) as primitives. When the Sound module gets loaded they are
> overwritten (or tests are used instead) to play actual sounds.
>
> Andreas you commented in AbstractSound "beep in the presence of the
> sound system. this method may still #primitiveBeep if sound	support
> is disabled or doesn't work or whatever". So use that please don't clog
> up Object with methods that aren't required.
>
> Object>beep should be depreciated.

I concur.  The API of Object offers way too many superfluous messages that
don't belong there.  A method should only be in a class if any and all 
instances of the class are properly in the domain of the function 
implemented by the method.

Horns beep. But gases, ideas, variables and Colors generally don't.

--Alan



More information about the Squeak-dev mailing list