On Mon, Aug 24, 2009 at 3:32 PM, Joel VanderWerf <vjoel / path.berkeley.edu>wrote:

> Eric Hodel wrote:
>
>> I think multiple procs followed by a block is code smell therefore it
>> should be difficult to read and clumsy to write by default.
>>
>
> Right. And anyway, taking many arguments is code smell, isn't it?
>
> To pass more than one proc to a method, we have:
>
> run_with_handlers do
>  on :enter do ... end
>  on :leave do ... end
>  on :timeout, 10 do ... end
> end


Your argument is "make a DSL to handle multiple args" -- seems kinda
excessive, don't you think?

-- Yehuda


>
>
> Is there a compelling example of passing multiple procs in an argument
> list? The control structure examples, like
>
> my_if {
>  #cond
> }, {
>  #then_clause
> }, {
>  #else_clause
> }
>
> just don't ring bells for me, since they look clumsy and don't have the
> same scope rules as syntactic control structures.
>
> --
>      vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
>
>


-- 
Yehuda Katz
Developer | Engine Yard
(ph) 718.877.1325