[squeak-dev] Re: Cosmetic: move or remove a few temps inside closures

Andreas Raab andreas.raab at gmx.de
Mon Dec 28 01:26:53 UTC 2009


Levente Uzonyi wrote:
> On Sun, 27 Dec 2009, Andreas Raab wrote:
>> Not that I'm arguing all temps should always be at method level but 
>> neither do I think all temps at block-level should be considered the 
>> only acceptable variant. There is a trade-off which comes from various 
>> ways of using the tools (for example visibility of a temp during 
>> debugging) and the writer of the method should be allowed to decide 
>> which temps to move to block-level and which ones not. For example, 
>> there is absolutely no difference between:
> 
> I agree, but I think pushing the temporaries into the innermost context 
> where they are used is useful. Noone is forcing anyone to do so.

A contraire. Pushing temps into the innermost context in all packages 
*is* forcing them on everyone else. I won't ever argue about changes 
like these if they serve a goal (i.e., some bit of work that you're 
trying to achieve) but making changes specifically for "cosmetic" 
reasons in hundreds of methods deserves at least a bit of agreement 
whether these changes are being seen as worthwhile. Precisely because 
individual preferences differ. I think we do need a bit of agreement in 
the community before we start pushing such wide-ranging cosmetic changes.

Cheers,
   - Andreas




More information about the Squeak-dev mailing list