On Mon, Jan 07, 2008 at 05:23:36PM -0800, 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?
No, the tests are probably assuming a particular Haskell implementation that likely uses trees underneath, I would guess. Such an assumption would be erroneous. > (is it possible, in P6, for hash keys to not be comparable?) Certainly, though the default key type is Str, which is always comparable. But we can presumably hash anything that supports an identity via .WHICH. This minimal requirement does not imply an orderable type. Larry