Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^11: What makes an array sorted and a hash unsorted? (nit)

by tye (Sage)
on Jun 05, 2009 at 15:29 UTC ( #768826=note: print w/replies, xml ) Need Help??


in reply to Re^10: What makes an array sorted and a hash unsorted?
in thread What makes an array sorted and a hash unsorted?

And given knowledge of algorithm (use the source), and the current bucket size, (see the second element of scalar %hash), the ordering is knowable; therefore definable; therefore defined by the implementation(s).

Actually, you have overlooked the order of items on the linked list of a bucket that holds more than one entry.

- tye        

  • Comment on Re^11: What makes an array sorted and a hash unsorted? (nit)

Replies are listed 'Best First'.
Re^12: What makes an array sorted and a hash unsorted? (nit)
by BrowserUk (Pope) on Jun 05, 2009 at 17:31 UTC

    Woe! A non-pedantic counter-argument. I wasn't expecting that. But then, nobody expects....

    And you are, as usual, correct.

    I could argue that "knowledge of the algorithm" covers it, but in truth, I hadn't even considered it :)

    But then again, I did say:

    the iteration order of hashes, (also unspecified), is defined, (as a matter of practicality), to be the simplest or most efficient, (which are often the same thing), order of traversal of the data-structures underlying the implementation.

    which absolutlely does cover it. So, halvsies :)


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://768826]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (None)
    As of 2021-10-18 23:24 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      My first memorable Perl project was:







      Results (76 votes). Check out past polls.

      Notices?