[Newbies] remembering variables

Giovanni Corriga giovanni at corriga.net
Mon Jun 9 06:44:36 UTC 2008

Il giorno mar, 03/06/2008 alle 03.01 +0000, peter h meadows ha scritto:
> Oh. I'm still very new to smalltalk. It seemed like it would help me to 
> understand what's going on. I wanted it to remember everything. E.g if the 
> thing is an array it will tell me what has been stored in it. Also, 
> wouldn't it help with code completion? If it knows what type of object it 
> was in the past it can guess which messages I want to send to it. That 
> would be useful.

There's a package called RoelTyper that does something similar: goes
over the whole image and looks at whatever messages are sent to instance
variables etc. in order to determine which object classes the variables
hold. Usually it manages to identify 80% of the variables, and to give
you a short list of possible classes in the other 20%.
I don't think anyone went around properly integrating it with the
browser UI, but I know that eCompletion uses it to do its magic.

That said, the best thing to identify what a variable holds is to give
it proper names: once you know what's the purpose of a variable you
usually care less about what the specific class of the variable is.


More information about the Beginners mailing list