Block temps was: Porting from other dialects

glenn krasner at objectshare.com
Tue Aug 18 17:25:21 UTC 1998


At 05:24 PM 8/17/98 -0700, John-Reed Maffeo \(rlpa80\) wrote:
>-snip
>
>Are block temps a good idea? 

The generic form of this question is "are more-local variables a good
idea?" and the generic answer is "yes". Method temporaries are a good idea,
instance variables are a good idea, class variables are a good idea.
Class-shared variables are a good idea (perhaps not as implemented by
Pools). Globals are a good idea, but shouldn't be the only variables.

So is it good an useful to have temporary variables scoped to the life of a
block activation? Certainly. Block arguments already are (conceptually, at
least).

>Should they be available in the Squeak base?

Ah, a much more interesting question, which might be rephrased as "would
block temporaries carry their  weight in the Squeak context?" I don't feel
qualified to render an opinion on this, although I will say that when
Squeak has block closures, the ability to implement block temps will be a
natural consequence and will probably have low weight.

glenn





More information about the Squeak-dev mailing list