On Tue, 23 Sep 2003, Leopold Toetsch wrote:

> Steve Fink <[EMAIL PROTECTED]> wrote:
> 
> > You seem to be suggesting something like:
> 
> No. My suggestion didn't cover splat arrays. When you don't know, what
> sub you are calling, you just have to flatten the splatted args -
> currently.
> 
> Another question: E6 seems to indicate that splat flattening happens
> before parameter binding:
> 
> ,--[ E6 ]-----------------------------------------------------------------
> |    This operator (known as "splat") simply flattens its argument into a
> |    list. Since it's a unary operator, it does that flattening before the
> |    arguments are bound to their respective parameters.
> `-------------------------------------------------------------------------
> 
> Before is of course not a definition, when the flattening should happen,
> but it seems to indicate, that flattening is done in the caller.

Caller flattens, callee binds. That way the caller can have pairs in the 
arrays in the parameters that'll bind in to named variables in the called 
function.
 
> And can the flattening have side effects? What about tied arrary
> splats? I can imagine, that the called sub can't flatten the array
> because of tieing.

Right. All flattening happens in the caller.

                                        Dan

Reply via email to