Dave Whipp wrote:
> The tests in S02 L<S02/Literal/In order to interpolate an entire hash>
> appear to assume that an interpolated hash renders its keys in a sorted
> order. But this property doesn't seem to be stated in the text. Is it
> true that the keys are always sorted for interpolation? (is it possible,
> in P6, for hash keys to not be comparable?)

I don't know if it's stated anywhere; but ISTR something about %h.keys
returning a Set instead of a List, and %h.vals returning a Bag.  In
fact, I believe that this sort of thing was part of the motivation
behind adding Sets and Bags to the core language: hash keys are not
inherently sorted; and if you're using something other than strings as
your hash keys, the keys may not be sortable.

-- 
Jonathan "Dataweaver" Lang

Reply via email to