Hello all!

In reading S06 from the svn repository I had some questions about the use of prefix:<*> in different contexts. When used in an argument list, it forces pairs to be interpreted as named args. When used in a parameter list, it causes slurpiness.

It seems to me like these are related contexts-- arguments to a sub are supposed to fulfill its parameter list. This makes the overloading of prefix:<*> confusing to me.

I'm pretty sure we don't need slurpiness in argument lists, and I don't know if the prefix:<*> notation for named arguments would be useful in parameter lists. But just because I can reason that, for example, prefix:<*> in an argument list can't mean slurpiness, that doesn't make it clear to me what prefix:<*> _does_ mean in that context.

I think I understand that prefix:<*> is available outside of parameter lists because that's the only place we need it to mean slurpiness. This particular overloading, however, seems like one that I'm likely to forget or mess up because I don't see the connection between the two different meanings.

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?

Any explanations are appreciated!


Reply via email to