Block temps was: Porting from other dialects
arning at charm.net
Tue Aug 18 00:38:06 UTC 1998
On Mon, 17 Aug 1998 17:24:14 -0700 "John-Reed Maffeo \(rlpa80\)" <rlpa80 at email.sps.mot.com> wrote:
>What is the deal with block temps. They are a pain to convert during a filein
>and I don't know what else to do about them. I just change them all to method temps.
>Are block temps a good idea? Should they be available in the Squeak base?
A number (most?) Smalltalks support them. The are handy in that they are <nil> each time a block is evaluated. When they are treated as method temps (either through my Compiler mod or a decision by the programmer), then the variables retain their value from one evaluation to the next. It really depends on whether you need the value carried across evaluations of the block. If you don't, then block temps will reduce the amount of garbage hanging around and represent your intentions more clearly.
In Squeak? Why not?
More information about the Squeak-dev