Chaim Frenkel writes:
: >>>>> "LW" == Larry Wall <[EMAIL PROTECTED]> writes:
:
: LW> : =item vtable
: LW> :
: LW> : The vtable field holds a pointer to the vtable for a variable. Each
: LW> : variable type has its own vtable, holding pointers to functions for
: LW> : the variable. Vtables are shared between variables of the same
: LW> : type. (All integer arrays have the same vtable, as do all string
: LW> : scalars and so on)
:
: LW> I think that last statement is false. I think strings will have
: LW> several vtables depending on their format. (So might integers, if we
: LW> decide to stitch in bigints.)
:
: Actually, it isn't false. Just not 100% accurate statement. During some
: interchange with Dan. We discuseed saving various flag checking by
: swapping vtbls. (Hmm, might this be a state machine?)
I was talking about utf8 strings having a completely different vtable
than a utf16 or a utf32 string. The statement in question seems to be
incompatible with that, but I'm not here to argue about that.
What I'd like to figure out about these vtables is how we do something
as simple as string comparison if two strings have different vtables.
Basically it's the old overloading dispatch problem all over again.
It's not clear to me whether the intrinsic types should have a different
solution to this than the extrinsic types.
Doubtless there are already proposals out there that I just haven't
read yet. I'm just letting you know where my thinking is at, even if I
look ignorant of current discussions elsewhere. I only just got caught
up reading the bootstrap mailing list this weekend. And I'm still 1300
articles behind in perl6-language, sigh...
Larry