"Leo Razoumov" wrote:
> For example:
>
> n  = 0
> my = 1
> (1..100).each \
> {
>   <my,local,vars,declared,here>
>   |n|
>   my += n
>   # ....
> }
> n  # -> 10  #side effect, 'n' was overriden within the block
> my # -> 1   #still old value, not affected by block-local var. of
the same name

That's not messy! In fact that looks like good old easy to understand
lexical scope :-)   It's also easier to remeber than most of the other
(otherwise great) suggestions. But of course it is declarative: Then
there's also the declarative assignment to make it look more
ruby-like...

Dennis Decker Jensen