Block temps was: Porting from other dialects

John-Reed Maffeo rlpa80 at
Tue Aug 18 15:04:57 UTC 1998


Do I understand this correctly.

1. Block temps in many/most Smalltalks endure for the life of the block only.

2. Your compiler mod does not implement block temps;  just allows the code to

be parsed by the compiler and actually implements them as method temps. In
other words, you have automated the process that I go through when I edit
a method to conform to Squeak.

3. Implementation of blocks temps is left as an exercise for the student;)



Bob Arning wrote:

> On Mon, 17 Aug 1998 17:24:14 -0700 "John-Reed Maffeo \(rlpa80\)" =
> <rlpa80 at> wrote:=20
> >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?
> Cheers,
> Bob

More information about the Squeak-dev mailing list