T
Thomas 'PointedEars' Lahn
Jorge said:The time to create it is === the time to create it,
Correct.
no matter *when*.
Nonsense, see above.
What matters is that if it isn't needed, why bother creating it ?
What matters is that it takes extra effort to recognize if it is needed.
And that effort takes time. So it matters very much when creation takes
place, and under which conditions.
How do you know that it takes additional "parsing" time ?
As the reference needs to be searched for, that much is self-evident.
You provide another example:
How could you possibly detect while parsing a, for example, args= eval
('arg'+'uments'); ?
That's in fact the beginning of a really good argument against conditional
creation of `arguments'.
What if it's a call to its getter what triggers its creation
"lazily" ?
That would be an impossible implementation.
Have you ever heard about the "lazy-function-definition-pattern" ?
You are not making any sense.
PointedEars