What rules to follow to avoid block-closure problems?

Paolo Bonzini bonzini at gnu.org
Sun Jan 13 08:49:20 UTC 2008


>> Is there a *simple* rule to follow to avoid this? Should every use of nested
>> blocks be replaced by a self-message (with parameters for all the block
>> context needed) that does the same? Would be a shame, but if it guarentees
>> safe code I will gladly do it.

It should.

> Let me know if that doesn't explain it well enough and I'll try to
> come up with an example... ;-)

No, it doesn't.  The OP's problem is not about "blocks" per se, it is 
about blocks *not behaving as real closures*.  It's a pity that I've 
seen the community discuss this issue for at least 10 years, and no 
solution has been agreed upon yet.

Paolo




More information about the Squeak-dev mailing list