Animorphic ST (Strongtalk) released!

Ned Konz ned at bike-nomad.com
Sat Jul 20 16:44:45 UTC 2002


On Saturday 20 July 2002 09:20 am, Diego Gomez Deck wrote:
> I had exactly the same type of problems in "sure" typed system (to
> say: Java).  With other problems: (classIsNotAnObject,
> nullIsNotAnObject, and a large list of etc)

Actually, when you look at the reasons for DNU's or type errors in 
Smalltalk as well as Java, one particular reason stands out:

The use of nil to represent an optional reference.

Get rid of this (by using a Null Object Pattern, perhaps: 
http://www.smalltalkchronicles.net/edition2-1/null_object_pattern.htm) 
and you get rid of many runtime type exceptions.

Or use custom nil objects that provide safe default behavior; i.e. 
NilCustomer, etc.

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE




More information about the Squeak-dev mailing list