old-design-docs
old-design-docs copied to clipboard
Specify handling of named parameters for junction ordering
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?
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.