Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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

by tye (Sage)
on Jun 05, 2009 at 15:29 UTC ( [id://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        

Replies are listed 'Best First'.
Re^12: What makes an array sorted and a hash unsorted? (nit)
by BrowserUk (Patriarch) 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?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-03-29 05:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found