From: matz@... (Yukihiro Matsumoto) Date: 2003-01-31T08:03:54+09:00 Subject: Re: Local variables & blocks Hi, In message "Re: Local variables & blocks" on 03/01/31, ahoward writes: |> Describe your feeling and ideas. | |please also see prior threads. I've read "export" stuff. But it's a matter of policy. And I now believe scope nesting is a bad thing, at least not as good as I expected when I introduced the current "block local variable" behavior. Besides, variable shadowing is evil. So I think "export" is not the way for Ruby to go. |> This is why I post. What kind of situations do you think this change does |> not cover properly? | | * Threads Incompatibility can be a problem here. But language designers also need a chance to fix bad design. We are not perfect. | * GC This would not be a problem except for cases like: | * Need to track memory usage in blocks : | | (2 << 15).times do |i| | eval "leak_#{i} = 'a big fat leak' * (2 << 16)" | end which I believe pretty exceptional. Ruby don't stop you when you order it to shoot your foot. It's your responsibility. | * Comfort in knowing a module writer cannot fill your namespace up | inadvertantly I don't really understand this namespace issue. Could you explain more? Modules don't and won't pollute in-block namespace. matz.