Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: Scalars, Lists, and Arrays (run time)

by Dominus (Parson)
on Jan 23, 2008 at 15:21 UTC ( #663805=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Scalars, Lists, and Arrays (run time)
in thread Scalars, Lists, and Arrays

> No, the comma operator is actually compiled exactly the same way.
Please reread the sentence you quoted. I did not say the comma operator is compiled differently. I said the scalar operator changes the way the program is compiled. And it does change the way the program is compiled, by causing the insertion of an additional op node into the optree.

Then I said that the change to the way the program was compiled causes the comma operator to return its second operand, instead of constructing a list value. As you explained, the additional op node has precisely this effect.


Comment on Re^3: Scalars, Lists, and Arrays (run time)
Re^4: Scalars, Lists, and Arrays (run time)
by tye (Cardinal) on Jan 23, 2008 at 15:43 UTC

    I could buy that weaseling out if you had said those things in the order in which I had quoted them. But the first thing you said about compile/run time was:

    because all contextual effects occur at compile time, never at run time

    So forget my complaint about your subsequenty statement (which I find misleading but can be awkwardly interpretted as "correct" as you note, especially if you ignore the above phrase).

    You could claim that contexts are created at compile time but the effects of those contexts clearly must at least sometimes be applied at run time (since contexts get passed in to subroutines) and, in current versions of Perl, most if not all contextual effects occur at run time (nearly the opposite of what you claimed).

    - tye        

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (11)
As of 2014-10-20 11:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (75 votes), past polls