On Tue, 29 May 2001 21:31:50 +0900 ts <decoux / moulon.inra.fr> wrote: > >>>>> "M" == Mike <mike / lepton.fr> writes: > > M> Why is block arguments definition so different from method arguments > ^^^^^^^^^^^^^^^ > M> definition? > > It's best to see |x, y, z| as a multi-asssignement > > pigeon% ruby -e 'x = 1, 2, 3; p x' > [1, 2, 3] > pigeon% > > there are *not* arguments (in the sense of method arguments) of the block > Why aren't they arguments? or why aren't methods arguments a multi-assignement? I think that passing code to methods in one of the greatest features of ruby. That's why I would like it to be as clean as possible. I think they appeared in Ruby as iterators, but they are much more than iterators, they are callbacks. IMO, callbacks should act like methods. Then I rejoin the still open (?) thread about local block vars. I like the <a, b, *c> notation that was proposed to have a, b and c local to the block. It would be nice it if these args would be defined like method arguments, and I would love it if variables created in the block would be created in the caller's binding. Actually, If something like this is implemented, I can't see where I would use the old |...| format. Mike. midulo.