On Apr 19, 2006, at 5:38 AM, Nis Jorgensen wrote:
John Buckman wrote:
HOWEVER, Jeremy wrote:
You could throw the handle name into a namespace variable. They
don't
currently get cleaned up.
and he's absolutely right, as code like this:
catch {namespace eval space {}}
catch {adp_puts $space:x}
set space:x 1
works as expected. So, Jeremy's tip to put per-interpreter globals
into
a namespace is an elegant work-around.
Disagree about the "elegant" part. I find the fact that ::foo is
cleaned
up, while ::bar::foo isn't counterintuitive, and something I would
change "in a perfect world". Suggesting that people rely on this
behavior makes it harder to change in the future.
How can you know exactly what variables to clean up in each
namespace? Even the cleanup for the global namespace doesn't
completely wipe out all variables.
- Jeremy
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]>
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
field of your email blank.