Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^18: Hash order randomization is coming, are you ready?

by BrowserUk (Pope)
on Dec 04, 2012 at 17:38 UTC ( #1007129=note: print w/ replies, xml ) Need Help??


in reply to Re^17: Hash order randomization is coming, are you ready?
in thread Hash order randomization is coming, are you ready?

From a programmer's perspective, nothing has changed. It means you can't rely on the order in which the keys of a hash a returned by keys (except the documented exception).

If the few of p5p are to make changes that can break the code of the many perl users, even if those breakages come as a result of dependence -- accidental or otherwise -- upon long-term actual -- if undocumented -- behaviour, is it unreasonable to ask that the reasoning behind the change that causes that breakage be publicly known?


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
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.

RIP Neil Armstrong


Comment on Re^18: Hash order randomization is coming, are you ready?
Re^19: Hash order randomization is coming, are you ready?
by demerphq (Chancellor) on Dec 04, 2012 at 21:38 UTC

    Your question supposes that this change actually breaks something. It doesn't. Any code that was correct in the first place, which makes no assumptions about the order of keys returned from a hash will continue to work just as well as it did before. Code that already was broken, albeit perhaps subtly, will now regularly fail.

    While I am aware this will cause some temporary turbulence our community and the software we run will be the better for it.

    ---
    $world=~s/war/peace/g

      Your question supposes that this change actually breaks something. It doesn't.

      Oh. So this whole thread is predicated on the fact that this is a benign change that will not break any existing code.

      If you cannot see how ridiculous that statement is coming from the same author as started the thread ... there's no point in continuing.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      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.

      RIP Neil Armstrong

Re^19: Hash order randomization is coming, are you ready?
by tobyink (Abbot) on Dec 04, 2012 at 23:11 UTC

    As I understand it, any packages broken by this change are not relying on undocumented behaviour; they're relying on behaviour which is documented as being unreliable.

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
      packages broken by this change are not relying on undocumented behaviour; they're relying on behaviour which is documented as being unreliable.

      Either way; broke is broke. No one is suggesting that the change shouldn't be implemented, but is it unreasonable to want to know what the supposed benefits are intended?


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      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.

      RIP Neil Armstrong

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2014-04-19 00:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (473 votes), past polls