Re: Pass by Reference

new topic     » goto parent     » topic index » view thread      » older message » newer message
mattlewis said...
Critic said...
mattlewis said...

Things like var_id(), and other reflection like techniques are more likely to surface when we get into dynamically evaluated code. It might be a reasonable workaround for a more native implementation of PBR.

var_id() has a potential problem that routine_id does not have: What if I take a reference to a variable that is allocated on the call stack? The variable disappears after the call, but how is the reference invalidated? Other pass by reference syntaxes do not necessarily have this issue.

True. That's another area that has to be thought out before it could happen, and just for reasons like that.

Matt

Can a variable be on the stack if it is not a procedure argument or local variable? If not so I don't see how this can be a problem. At parse time we know that a variable is on stack and so can forbid reference to it. Please show me an exemple where it's not true.

Jacques

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu