On Thu, Aug 18, 2005 at 12:24:40 +0000, Ingo Blechschmidt wrote:
> Hi,
>
> Yuval Kogman <nothingmuch <at> woobling.org> writes:
> > So now that the skeptics can see why this is important, on the
> > design side I'd like to ask for ideas on how the code serialization
> > looks...
> >
> > sub { $?DOM.document.write("<p>hello world!</p>") }.emit(
> > :runtime($browser_autodetect_object),
> > # this can be guessed by asking the $runtime object:
> > # :language<javascript>,
> > );
> >
> > This is superficially nice,
>
> Indeed!
>
> > but here's what's missing:
> [...]
>
> > - what exactly is a code object?
> > - a wrapper for some PIL code
> > - that can be executed by the runtime
>
> Code objects may as well be executed at compile-time
> (think macros, use and BEGIN blocks), but...:
But it's still the runtime that runs them ;-)
Compilation has a runtime that runs the compiler, and compile-time
code. The output may be handed down to another runtime that actually
"runs".
>
> sub foo { $?DOM.document.write(...) }
> BEGIN { foo() }; # error, there's no $?DOM object
> # at compile-time!
Unless you're compiling in the browser ;-)
> Well, you call &code.emit above, so it's probably a Code
> object, even though it calls subs and methods from the
> Perl6::Internals namespace (or somesuch).
Not &code, but the return value of &code.emit
>
> > - handling of data
> > - types of:
> > - globals?
>
> I've probably misunderstood you, but can't globals, like all
> other variables, have any type you want them to have?
Not types in the "kind of value" type... Read it as:
handling of data... what types of data... global variables are
types of data
> > - closures?
>
> A subclass of Code, e.g. Bare.
How are they stored?
> I'd like to have a pragma to switch between these policies.
I doubt a pragma is enough - we need full introspection and fine
grained control for this, both in the lexical and the dynamic
scopes.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me supports the ASCII Ribbon Campaign: neeyah!!!
pgpBn9qG4r51e.pgp
Description: PGP signature
