[Newbies] Re: Recap: How to empty a collection
blake at kingdomrpg.com
Tue Feb 19 23:16:56 UTC 2008
On Tue, 19 Feb 2008 15:08:56 -0800, nicolas cellier <ncellier at ifrance.com>
> Blake a écrit :
>> Well, from what I was reading, "slow" and "smells" is putting it too
>> mildly. It sounds like it can corrupt your image, i.e., leave you with
>> non-working objects in unexpected places. I wouldn't even mention it.
> Have a proof of what you wrote?
Proof? None at all. I just have this, by Gulik:
"[become:] doesn't work fine. It breaks code that relies on hashes;
specifically, a Dictionary elsewhere in yo ur image can start acting
screwy if you do a #become: variant that doesn't preserve an object's
hash. See #becomeForward>>copyHash:. You would then also be relying on a
Squeakish behaviour and your code would become less portable across Sm
They are also a fantastic way to introduce bugs of various sorts, and can
even cause an image to crash (as in, stack trace and exit to the OS). Say,
for example, that one of the arguments you pass is accidently nil, true or
false? Your image would c ontinue working... for a while."
Does this sound like something a newbie should use? No, it does not.
More information about the Beginners