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

Colon-pair details in REPL look buggy #2536

Open
fecundf opened this issue Jan 2, 2019 · 6 comments
Open

Colon-pair details in REPL look buggy #2536

fecundf opened this issue Jan 2, 2019 · 6 comments
Labels
docs Documentation issue (primary issue type) update part of "docs" - indicates this is an update for an existing section; rewrite, clarification, etc.

Comments

@fecundf
Copy link

fecundf commented Jan 2, 2019

https://docs.perl6.org/type/Pair says "Colon pairs can be chained without a comma to create a List of Pairs. Depending on context you may have to be explicit when assigning colon lists." - and follows with examples, which led me to experiments, that raise more questions. I would think all 5 of these should say the same thing but instead give 3 different answers. Does the doc need an addition to describe this? Is it a problem with Rakudo Star 2018.10?

$ perl6
To exit type 'exit' or '^D'
> (:a1:b2:c3)
(a1 => True b2 => 1 c3 => 1)
> (:a1,:b2,:c3)
(a1 => True b2 => True c3 => True)
> :a1,:b2,:c3
(a1 => True b2 => True c3 => True)
> :a1:b2:c3
a1 => True
> :a1 :b2 :c3
a1 => True
@JJ
Copy link
Contributor

JJ commented Jan 4, 2019

Maybe this is an issue for perl6/doc and not roast? Should I transfer it?

@lizmat
Copy link
Collaborator

lizmat commented Jan 4, 2019

Yeah. Afaik, the colonpairs are currently working by design (with which I don't always agree, but that's another matter).

@JJ JJ transferred this issue from Raku/roast Jan 4, 2019
@cfa
Copy link
Contributor

cfa commented Jan 4, 2019

This behaviour appears to be unchanged since 2015.12:

15:27 | cfa         | bisectable6: my @a = :a1:b2:c3; say @a.elems
15:27 | bisectable6 | cfa, On both starting points (old=2015.12 new=f2ed3db) the exit code is 0 and the output is identical as well
15:27 | bisectable6 | cfa, Output on both points: «1␤»

FYI, documentation was added in this commit.

(CC @AlexDaniel, who mentioned an old RT ticket about this just now.)

@AlexDaniel
Copy link
Member

@cfa
Copy link
Contributor

cfa commented Jan 4, 2019

Thanks.

@JJ JJ added docs Documentation issue (primary issue type) update part of "docs" - indicates this is an update for an existing section; rewrite, clarification, etc. labels Jan 5, 2019
@JJ
Copy link
Contributor

JJ commented Jan 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation issue (primary issue type) update part of "docs" - indicates this is an update for an existing section; rewrite, clarification, etc.
Projects
None yet
Development

No branches or pull requests

5 participants