From: Robert Klemme Date: 2005-02-01T22:45:49+09:00 Subject: Re: Default values for block parameters "Matt Mower" schrieb im Newsbeitrag news:d563731905020103585443f29a@mail.gmail.com... > On Tue, 1 Feb 2005 18:27:28 +0900, Mark Hubbart wrote: > > On Tue, 1 Feb 2005 17:10:50 +0900, Robert Klemme wrote: > > > > Since this workaround is a touch unaesthetic I wonder whether there > > > > was a particular reason for not allowing default values to be > > > > specified for block parameters? Do you happen to know? > > > > > > Dunno, but here's my guess: since blocks are usually called at a single > > > place in code (as opposed to a method) default parameters do not make much > > > sense generally. > > > > I think that's a good assessment... I think historically, they may > > have been considered superfluous. But it could change in the future; > > with the addition of &block syntax in a block's parameter list > > (available now, in 1.9, and later, in 2.0), it might be that block > > parameter lists are going to be made more consistent with method > > parameter lists. Even more so if you view blocks / lambdas as nameless functions, which you can with some justification. > Robert, Mark, thanks for your views. That was really helpful. You're welcome! Kind regards robert