On Sat, Aug 20, 2005 at 22:27:56 +0000, Ingo Blechschmidt wrote:
> > Not &code, but the return value of &code.emit 
>  
> Hm, Str? Or possibly a subtype of Str, allowing: 

I would guess an AST, that is, any object, that implements
stringification.

the AST could just be the same PIL reblessed with some new
serialization magic, but I guess for most languages you want to make
a real AST to AST conversion, and only then serialize.

> Ah. Normal globals can probably be freezed more or less exactly 
> like normal lexical variables, I don't see a big problem there. 

The question is - should globals be frozen? Or should they
optimistically refer to values on the other side?

I think that

        sub hello {
                $*DOM.document.write("<p>Hello World!</p>");
        }

should capture $*DOM in the same sense that a closure matches them,
and the global scope is implicitly the uber-parent lexical scope
type thingy.

Then, once we've unified, we can steal something from C and friends:

        $*DOM is external;
        sub hello {...} # $*DOM is not serialized, but will be resolved
        # by the runtime on the other side

Anybody got ideas on how control is needed, and how it should be
specified?

> The backend does have to take care of read accesses, of course 
> (think $CALLER::, $::(...), %MY::, %OUR::, etc.). 

That's just the pads of the lexical structure and the dynamic stack,
and they're existence is implied by PIL. Adding the interface is
easy if the implementation isn't drunk, since things will tend to
just work out.

> The code itself isn't much a problem, much more problematic 
> are access to outer lexical variables: 
>  
>     my $a = ...; 
>     my $b = { ...$a... }; 
>     $b(); 

Right... It is my assumption that actually serializing this is
trivial. The real question is whether we want to serialize, and
what parts we would like to serialize when we do.

-- 
 ()  Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418  perl hacker &
 /\  kung foo master: /me sushi-spin-kicks : neeyah!!!!!!!!!!!!!!!!!!!!

Attachment: pgpi2FAoBtqax.pgp
Description: PGP signature

Reply via email to