[squeak-dev] Re: Cosmetic: move or remove a few temps inside
nicolas.cellier.aka.nice at gmail.com
Sun Dec 27 20:58:31 UTC 2009
2009/12/27 Andreas Raab <andreas.raab at gmx.de>:
> Nicolas Cellier wrote:
>> We shall now take the habit of declaring temps in inner scope possible
>> and avoid writing in outer temps if possible.
> Why? As long as auto-declare temps inserts temps at method level and
> auto-remove of unused temps simply fails for block-level temps, this policy
> would be annoying at best.
> - Andreas
Oh yes, tools are not up to date. That should be changed too.
Meanwhile, we can also avoid writing codes like
| ans |
[ans := self = anObject] ifError: [:aString :aReceiver | ^ false].
and replace with:
^[self = anObject] ifError: [false]
I guess one outer temp and one non local return removed are worth a
change in Cog, and to my taste, the code is not less clear.
More information about the Squeak-dev