[Cuis-dev] nil subclasses (Re: clever or silly idea?)

Martin McClure martin at hand2mouse.com
Thu Jun 13 13:19:32 PDT 2024


On 6/13/24 12:46, Andres Valloud via Cuis-dev wrote:

> Yeah, pretty much --- the debugging tools, and whatever messages are 
> required by the virtual machine (a minimum of doesNotUnderstand:). 

[...]

Not all VMs require #doesNotUnderstand: to be understood. GemStone, for 
instance, does not. If you send a message to an object that understands 
nothing, you get a signaled error like "doesNotUnderstand: not 
understood" but the VM keeps running.

One of the tests of the Sparkle inspector I wrote for GemStone a few 
years ago is to create a subclass of nil that defines some named 
instvars but /no/ methods. The inspector then sends that class #new, and 
inspects the resulting object successfully, showing the instvars with 
the value nil. It then changes the value of the instvars and displays 
the new values. It all works fine without sending the object a single 
message. I'd like to see inspectors in all Smalltalks be able to pass 
such a test. The inspector in Cuis might be able to; I haven't tried.

Regards,

-Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240613/fafb6b05/attachment.htm>


More information about the Cuis-dev mailing list