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

.reverse doesn't flatten in Rakudo #3034

Closed
p6rt opened this issue Jan 23, 2013 · 4 comments
Closed

.reverse doesn't flatten in Rakudo #3034

p6rt opened this issue Jan 23, 2013 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jan 23, 2013

Migrated from rt.perl.org#116525 (status was 'rejected')

Searchable as RT116525$

@p6rt
Copy link
Author

p6rt commented Jan 23, 2013

From @masak

* [Coke] shudders at the new list model.
* [Coke] hasn't internalized it yet, so I keep doing things wrong with it.
<masak> [Coke]​: I've been bitten by it too. I'd like to hear what trips you up.
<masak> r​: say <a b c d>.kv.reverse.perl
15​:05 <+p6eval> rakudo 388c1b​: OUTPUT«((3, "d"), (2, "c"), (1, "b"),
(0, "a")).list␤»
<masak> I'd really expect that to flatten.
<masak> r​: say <a b c d>.kv.flat.reverse.perl
<p6eval> rakudo 388c1b​: OUTPUT«("d", 3, "c", 2, "b", 1, "a", 0).list␤»
<moritz> i guess it should
* masak submits rakudobug
<moritz> problem is, many of the methods were written by folk
(including me) that didn't really understand the list model back then
<tadzik> wait, why
<tadzik> why do you expect a list of pairs to flatten?
<masak> they're not pairs.
<masak> => makes pairs.
<masak> this is just sublists.
<tadzik> but honestly, I don't mind them in item context :)
<tadzik> you can always call flat. If you don't want that, you can't
call un-flat
<masak> tadzik​: yes, you can always call flat. but my expectation is
that .kv gives me a flat list already. and then I'm surprised when
.reverse reverses things pairwise.

@p6rt
Copy link
Author

p6rt commented May 1, 2015

From @jnthn

On Wed Jan 23 06​:11​:27 2013, masak wrote​:

<masak> r​: say <a b c d>.kv.reverse.perl
15​:05 <+p6eval> rakudo 388c1b​: OUTPUT«((3, "d"), (2, "c"), (1, "b"),
(0, "a")).list␤»
<masak> I'd really expect that to flatten.

Rejecting this ticket, since we decided (as part of the GLR) that method calls will not flatten.

@p6rt
Copy link
Author

p6rt commented May 1, 2015

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented May 1, 2015

@jnthn - Status changed from 'open' to 'rejected'

@p6rt p6rt closed this as completed May 1, 2015
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant