Beefy Boxes and Bandwidth Generously Provided by pair Networks Russ
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: Incrementing a Hash Value

by Sifmole (Chaplain)
on Jun 14, 2002 at 08:46 UTC ( [id://174481]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: Incrementing a Hash Value
in thread Incrementing a Hash Value

Please provide a single instance on any platform or version of Perl where it does not work the way I described. Not theory, but a specific example.

Replies are listed 'Best First'.
Re: Incrementing a Hash Value
by Abigail-II (Bishop) on Jun 14, 2002 at 08:53 UTC
    Why should I? Please provide a pointer to the documentation that specifies your code is correct. In one of my other replies I've specified a reference saying that's undefined.

    Abigail

      So you can't, okay. I know theory says it is undefined, however I have never encountered a version of Perl on any machine that did not follow that execution pattern. I can spout theoretical science which tells me that I can count on nothing I write executing as I expect -- but lucky me it usually does.

        You have not yet encountered a perl that didn't execute it in this way. You have been lucky in that all perls to date have happened to execute it in one particular order.

        Abigail has repeatedly pointed out with references to the documentation that the behavior is officially undefined. What would happen if a hypothetical JPerl reimplemented perl (as currently documented) in Java, but it chose a different behavior for postincrement? Oops, your code won't work because of an incorrect assumption about how postincrement will behave.

        Granted this is a hypothetical. But it remains the case that relying on undefined behavior is a sloppy practice and probably bound to eventually screw you over.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://174481]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.