From: Gavin Sinclair Date: 2002-09-24T12:14:10+09:00 Subject: Re: Larry Wall's comments on Ruby ----- Original Message ----- From: "Stefan Scholl" > "Gavin Sinclair" writes: > > > One of the coolest (not highest-value, just coolest) things about Ruby, IMO, is > > that "for a in x do ... end" is *nothing more than syntax sugar* for "x.each do > > |a| ... end". This is supreme orthoganality. Being able to apply "for ..." to > > your own classes is wonderful. > > It's a bit more than syntax sugar. Watch the scope of the local > variables! What do you mean? If "a" is defined, then "for a in x" and "x.each do |a|" both clobber the previously-defined "a". I don't see the difference for variables inside the block either. Gavin