in reply to Re^2: Why is the execution order of subexpressions undefined? (why not?)
in thread Why is the execution order of subexpressions undefined?

Sure it does. func( $pass_by_reference, "$pass_by_value" ). You can do that to strings, booleans, and numbers easily. Use Storable::dclone() if you want to pass in an object or data structure as a value.

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

  • Comment on Re^3: Why is the execution order of subexpressions undefined? (why not?)
  • Download Code

Replies are listed 'Best First'.
Re^4: Why is the execution order of subexpressions undefined? (why not?)
by ikegami (Patriarch) on Jul 14, 2006 at 21:16 UTC
    The new value is still passed by reference, but all of this is besides the point. As I said, such mechanisms weren't used.

      Yeah... it's the closest we get to it. What I really wish we had was not only undefined execution order but *delayed*execution* so nothing actually ran until you really needed it.

      ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

        Is this something planned for Perl6? I know it will have lazy lists.
        Be careful what you wish for. Haskell has lazy evaluation, but it is extremely easy to create a program plagued with space leaks. And if you eliminate the automatic memoization, you'll end up turning your space leaks into time leaks.