Reviving an old discussion ... On Mon, Jan 31, 2022 at 9:50 PM Dave Mitchell <davem@iabyn.com> wrote: > Just to be clear here. I fully expect that function calls will always > consist of the caller passing a list to the function, and that the > proposed named parameter syntax is just a way of easily processing > adjacent pairs of values in that list. So in: > > sub foo(:$x, :$y) { ... } > > The caller is expected to pass 4 arguments. How the caller does this is up > to the caller. They could do > > foo('x', 1, 'y', '2'); > Since arrays and hashes are flattened into a list, it seems that someone might do sub foo(:@bar) {...} and get surprising results. Either it doesn't do what they expect, or it's a syntax error. If named arguments can only use scalar values, why not drop the sigil? sub foo (:x, :y) { ... } Best, Curtis "Ovid" Poe -- CTO, All Around the World World-class software development and consulting https://allaroundtheworld.fr/Thread Previous | Thread Next