old-design-docs icon indicating copy to clipboard operation
old-design-docs copied to clipboard

Specify handling of named parameters for junction ordering

Open timo opened this issue 12 years ago • 1 comments

In the specs it says, that the leftmost 'all' or 'none' junction will be autothreaded before the first 'one' or 'any' junction. There is no word on named parameters. Will the "leftmost"ness be determined by the caller?

foo(:var_a(1&2), :var_b("foo"&"bar"));
foo(:var_b("foo"&"bar"), :var_a(1&2));

Will those result in different expansions?

timo avatar Mar 11 '13 01:03 timo

Apparently Rakudo can't tell if a named parameter was put before a positional parameter. So I see two possibilities:

  • Teach rakudo about the order of nameds between positionals
  • Add a little paragraph to the specs saying that the positional args will always be autothreaded before the positionals.

timo avatar Mar 17 '13 00:03 timo