[Python-Dev] Parrot -- should life imitate satire?
Dan Sugalski
dan@sidhe.org
Tue, 31 Jul 2001 23:43:45 -0400
At 07:12 PM 7/31/2001 -0400, Guido van Rossum wrote:
> > Guido van Rossum writes:
> > > Yeah, but the runtime could offer a choice of data types -- for Python
> > > code the constants table would contain Python ints and strings etc., for
> > > Perl code it would contain Perl string-number objects. Maybe.
> >
> > A perl6 value have a vtable, essentially an array of function pointers
> > which comprises the standard operations on that value. I talked to
> > Dan (the perl6 internals guy, dan@sidhe.org) about an impedence
> > mismatch between Perl and Python data types, and he pointed out that
> > you can have Perl values and Python values, each with their own
> > semantics, simply by having separate vtables (and thus separate
> > functions to implement the behaviour of those types). Code can work
> > with either type because the type carries around (in its vtable) the
> > knowledge of how it should behave.
>
>The vtable looks a lot like Python's type object. Is Perl's vtable an
>object in its own right?
Depends on your definition of object, I suppose. There is a mapping from
the low-level bits the interpreter needs to interpreted-language level
things--while the vtable won't actually be directly manipulatable at the
HLL level, manipulating HLL constructs will alter the vtable, so it's
effectively the same thing.
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
dan@sidhe.org have teddy bears and even
teddy bears get drunk