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

.gist of a Map was arguably better in the past (say Map.new(‘a’ => ‘b’)) #6603

Closed
p6rt opened this issue Oct 13, 2017 · 4 comments
Closed
Labels
regression Issue did not exist previously

Comments

@p6rt
Copy link

p6rt commented Oct 13, 2017

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

Searchable as RT132284$

@p6rt
Copy link
Author

p6rt commented Oct 13, 2017

From @AlexDaniel

Code​:
my @​a = [1,2,3,4]; my %h = 'a'=>'b','c'=>'d','101'=>'102'; my $c = \(|@​a, |%h); say $c.list; say $c.hash;

¦«2015.12»​:
(1 2 3 4)
Map.new(("101" => "102",​:a("b"),​:c("d")))

¦«2016.06»​:
(1 2 3 4)
Map.new(("101" => "102",​:a("b"),​:c("d")))

¦«2016.12»​:
(1 2 3 4)
Map.new(("101" => "102",​:a("b"),​:c("d")))

¦«2017.06»​:
(1 2 3 4)
Map.new(("101" => "102",​:a("b"),​:c("d")))

¦«HEAD»​:
(1 2 3 4)
Map.new((101 => 102, a => b, c => d))

Possible IRC discussion​: https://irclog.perlgeek.de/perl6/2017-10-09#i_15275925

Bisectable​: (2017-10-07) rakudo/rakudo@9247045

I think the previous output was better because (accidentally or not) it was giving executable code. Not that it has to be executable, but :a("b") makes a bit more sense than a => b for those who are familiar with perl 6. Maybe not, feel free to argue otherwise, I'm just the messenger.

@p6rt
Copy link
Author

p6rt commented Oct 17, 2017

From @zoffixznet

On Thu, 12 Oct 2017 22​:59​:36 -0700, alex.jakimenko@​gmail.com wrote​:

Code​:
my @​a = [1,2,3,4]; my %h = 'a'=>'b','c'=>'d','101'=>'102'; my $c =
\(|@​a, |%h); say $c.list; say $c.hash;

¦«2015.12»​:
(1 2 3 4)
Map.new(("101" => "102",​:a("b"),​:c("d")))

¦«2016.06»​:
(1 2 3 4)
Map.new(("101" => "102",​:a("b"),​:c("d")))

¦«2016.12»​:
(1 2 3 4)
Map.new(("101" => "102",​:a("b"),​:c("d")))

¦«2017.06»​:
(1 2 3 4)
Map.new(("101" => "102",​:a("b"),​:c("d")))

¦«HEAD»​:
(1 2 3 4)
Map.new((101 => 102, a => b, c => d))

Possible IRC discussion​: https://irclog.perlgeek.de/perl6/2017-10-
09#i_15275925

Bisectable​: (2017-10-07)
rakudo/rakudo@9247045

I think the previous output was better because (accidentally or not)
it was giving executable code. Not that it has to be executable, but
:a("b") makes a bit more sense than a => b for those who are familiar
with perl 6. Maybe not, feel free to argue otherwise, I'm just the
messenger.

This was done on purpose. `Map.gist` used to call `.perl` on the pairs in the past instead of `.gist`, which both is different from what `Hash.gist` does and is not correct. Certain things cannot be .perled while they can be gisted and also for some things (like List and Blob) .perl gives All The Things� for some things while .gist gives just the gist.

  c​: 2017.07,HEAD Map.new((​:42a, b => (1...2000))).gist.say
  https://gist.github.com/c9f8e43d227626d5c7b1f45d6397aaae

  c​: 2017.07,HEAD Map.new((​:42a, b => (1...*))).gist.say
  ¦2017.07​: «Cannot .elems a lazy listâ�¤ in block <unit> at /tmp/78NrayS5Sy line 1â�¤ «exit code = 1»» ¦HEAD(8a88d14)​: «Map.new((a => 42, b => (...)))»

@p6rt
Copy link
Author

p6rt commented Oct 17, 2017

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

@p6rt
Copy link
Author

p6rt commented Oct 17, 2017

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

@p6rt p6rt closed this as completed Oct 17, 2017
@p6rt p6rt added the regression Issue did not exist previously label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Issue did not exist previously
Projects
None yet
Development

No branches or pull requests

1 participant