On 12/30/05, Piers Cawley <[EMAIL PROTECTED]> wrote: > Stuart Cook <[EMAIL PROTECTED]> writes: > > > On 29/12/05, Austin Frank <[EMAIL PROTECTED]> wrote: > >> So, is there a conceptual connection between imposing named argument > >> interpretation on pairs in an arg list and slurping up the end of a > >> parameter list? Are there other meanings of prefix:<*> that relate to > >> one or the other of these two meanings? > > > > The missing link is that prefix:<*> in an argument list also causes > > things like arrays to be treated as a sequence of separate parameters, > > rather than as a single array parameter. See "Flattening argument > > lists" in S06. > > > > (This was the original meaning of prefix:<*> in arglists; the > > named-pair behaviour was added later, when pair values ceased to have > > named behaviour automatically.) > > Personally, I think that prefix * in an arglist should only flatten > array arguments if there is only one array. And if it doesn't, how do > I declare parameter that is 'a slurpy list of arrays' or 'the rest > of the arguments, without flattening'. If I *really* want aggressive > flattening then I can call, say, @slurpy_param.flatten
Does this imply that [EMAIL PROTECTED] === @slurpy.flatten ? Or, put another way, can't we just say that prefixed * is symbolic notation for flatten() in the same way that postfixed [] is symbolic notation for slice()? Rob