[perl #127143] Different Behaviour With/Without Commas in Sub/Method Calls and slipped hashes
[email protected] ("Brian S. Julin via RT") Mon, 21 May 2018 09:13:16 -0700
| Newsgroups | perl.perl6.compiler |
|---|---|
| Message-ID | <[email protected]> |
Without the comma, the colonpair is in infix position, which means it applies to the prefix unary | operator. So whether this should be an error or "work" depends on what we can teach the | operator to do with fake_infix adverbs it is passed. Note if we fix | to use fake infix adverbs, then we create the problem that |(1,1),(2,2),:f :g will be 1,1,:g,(2,2),:f. It might be best to teach | to throw when it is handed such things. There are several other operators that will find themselves in the same situation... especially we have other tickets about = which gets tricky due to the difference between list and scalar assignment.