From: Douglas Livingstone Date: 2005-04-06T23:13:23+09:00 Subject: Re: Garden RubyNuby Question on parameters in blocks vs. methods On Apr 6, 2005 4:11 AM, Daniel Amelang wrote: > > As for the first. Why not "do (a,b) ... end" instead of "do |a,b| ... > > end" Well, without thinking about it to much, I imagine it is simply > > due to syntax ambiguities. > > I've wondered about this one before. It would be _possible_ to change > the method definition to use pipes instead of parans, and not have > ambiguities (I think), but that's a pretty significant language > change. I guess they were just born that way, and it's too late to > change. So these two would be the same, right? def myfunc(foo = nil, bar = nil) end def myfunc |foo, bar| end Just a bit of sugar, I like it :) Douglas