Re: References (was: Re: Is garbage collection here yet?)
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: References (was: Re: Is garbage collection here yet?)

From: Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at>
Date: Tue Mar 21 2006 - 09:34:20 CET

Don Porter <dgp@email.nist.gov> wrote:
> Andreas Leitgeb wrote:
>> Nomenclature:
>> "live ref": a Tcl_Obj of new "reference type"
>> "stringified ref": the name of an auto-generated
>> variable. Each stringification will create a
>> new variable:
>
> Create it in what interp?

Well, whatever interp executed the code that caused
stringification.

I understand the problem, that the scope of variables
(autogenerated or not) is more limited than what one
would expect that of a "value" to be. I gather that
one can pass a dict or list from one interp to another,
but couldn't transfer autogenerated vars in the same way.

To solve this, either some way would have to be made
to access variables even cross-interp: yuck and not
even generally possible (e.g. accessing master's vars
from a restricted slave must not ever be possible).

Or we'd have to document that stringified references are
not portable between interps (real ref *are*, anyway)

PS: It's not as if I would propose anything in this direction.
    I just want to know how it could possibly work out.
Received on Sun Apr 30 02:43:04 2006