Re: [Madeleine-devel] Re: Generating commands
Status: Beta
Brought to you by:
ndrs
From: Anders B. <ndr...@ya...> - 2004-10-20 19:29:59
|
Hi Henrik, Nice work, you seem to have provided some new interesting ideas. I wish I had the time to seriously grok your code, but that's some mighty cool uses of eval. :) Henrik Horneber wrote: > 5.1 get its arity in order to know how many parameters we need to > generate. Second Achilles Heel. Stuff like def ameth(*args) has arity -1 > and hence does not work. Maybe this is not a problem if one uses a > special case, but I am seriously scared of array explosion/expansion > semantics, so I just leave this case out. In my first attempt I was > using *args in generating a one-size-fits-all command, but then I could > not pass instances that respond to to_a as arguments. But I don't claim > to have understood how *args expansion works, so I might just have done > soemthing stupid there. I'm not getting this, how does to_a affect the arguments? Is it the way you build and eval the "execute" method that causes this? /Anders |