From: Dennis Decker Jensen Date: 2001-03-13T23:40:02+09:00 Subject: [ruby-talk:12567] Re: FEATURE REQUEST: 'my' local variables "Guy N. Hurst" wrote : [A good summa summarum of discussed features] > However, it make ruby look somewhat declarative. > Yet think about private, public, attr, and the like. > Plus, think about the certainty it would afford, and > the time saved. "The time saved" implies time saved when writing libraries - right? The small Nuby don't need to worry about this before he throws himself out into the ocean of the RAA.... > Conceptually, > {|params, shadows~| .... } > > iterators work, closures work; optional extra control... * Params are as usual. Shadows are also params, but with localized changes to values from variables in the enclosing scope. * Imports are like shadows, but they aren't params (from a yield statement i.e.). If they don't exist in the external scope, they get created and initialized. * Exports are like imports, except that they are visible after the exit to the enclosing scope (non-localized changes). * There is no "native" block-local variables. The extra control is optional. Is my understanding correct? Thanks. Dennis Decker Jensen