Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Z and X think that a Slip represents multiple arguments #6128

Open
p6rt opened this issue Mar 6, 2017 · 1 comment
Open

Z and X think that a Slip represents multiple arguments #6128

p6rt opened this issue Mar 6, 2017 · 1 comment
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Mar 6, 2017

Migrated from rt.perl.org#130930 (status was 'new')

Searchable as RT130930$

@p6rt
Copy link
Author

p6rt commented Mar 6, 2017

From @smls

  say <a b> X~ (1, 2, 3); # (a1 a2 a3 b1 b2 b3)
  say <a b> X~ |(1, 2, 3); # (a123 b123)
  say <a b> X~ (1, 2, 3).Slip; # (a123 b123)

Those last two seem wrong. It's as if the meta-operator thinks it got
four arguments, i.e. as if it was called like​:

  say &[X~]( <a b>, 1, 2, 3 ); # (a123 b123)

I think in keeping with the single-argument rule, the X and Z
meta-operators should behave as if both sides were bound to a +@​
parameter, which would "disarm" the Slip and keep it from messing with
the internal algorithm​:

  sub a (+@​a) { dd @​a };
  a |(1, 2, 3); # [1, 2, 3]

@p6rt p6rt added the LTA Less Than Awesome; typically an error message that could be better label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

1 participant