[CCC] Object class comment

Lex Spoon lex at cc.gatech.edu
Mon Feb 28 23:43:39 UTC 2000


> Class Variables:
> 	DependentsFields		an IdentityDictionary 
> 


Go Dwight!  I'd vote that we *avoid* these bare type declarations,
myself.  If you are going to define a class variable, it would be nicer
to declare what the variable is actually used for:

	DependentsFields		maps each object to its dependents.  Useful for
objects that do not have an explicit dependenst field, so that all
objects may take part in the dependency mechanism.  See
Object>>dependents and its senders.

Usually you can trace the definers-of to figure out what the class is,
if you really need to know.  In this case there are 6 references and one
assignment, and the assignment makes it pretty clear what the class is. 
You *can't* do such a search to figure out a programmer's intent.

Also, such an easy case is *really* easy for an automatic type
inferencing tool, and hopefully Squeak will eventually be eventually
equipped with such a tool.  (plug plug)


Lex





More information about the Squeak-dev mailing list