Skip Menu |
Report information
Id: 131244
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: cpan [at] zoffix.com
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: Baggy/Setty .Str/.gist/.perl needs to guarantee order, like Map/Hash do
Download (untitled) / with headers
text/plain 1002b
https://irclog.perlgeek.de/perl6-dev/2017-05-02#i_14519628 * TimToady notes that .perl and .gist do guarantee sorted order 16:02 Zoffix s: bag(), 'perl', \() 16:02 SourceBaby Zoffix, Sauce is at https://github.com/rakudo/rakudo/blob/08a8075/src/core/Baggy.pm#L375 16:03 Zoffix Don't look like it 16:03 TimToady they're supposed to 16:03 Zoffix And if it does, then .Stringy also does, 'cause they're using the same Baggy!LISTIFY method 16:04 TimToady you can always iterate a hash yourself if you really want unordered 16:04 sets and bags should follow the same policy 16:05 Zoffix So Hash.Str is guaranteed to be ordered? 16:05 Oh yeah: multi method Str(Map:D:) { self.sort.join("\n") } 16:06 m: use nqp; dd nqp::getattr(Map.new(<a 42>), Map, '$!storage').^name 16:06 camelia rakudo-moar 08a807: OUTPUT: «"BOOTHash"␤» 16:07 Zoffix And Baggy takes nqp::iterator() of BOOTHash and just loops over it... I'm guessing that's unordered 16:07 timotimo yeah, that's unordered


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org