At 10:36 AM 9/26/2001 -0700, Paul Prescod wrote:
>Dan Sugalski wrote:
> >
> >...
> > Yup. There's a vtable function who's sole purpose is to return the name of
> > the variable's type, as well as an integer representing its type. There's
> > also an isa and can function in there.

I split the question into pieces here:

>Why not merely have a vtable function that returns the type object which
>knows its own name,

I didn't see a point to the indirection.

   name = pmc->vtable[GET_NAME]();

instead of:

   name = pmc->vtable[TYPE_OBJ]()->name;

(Assuming the C's more or less right, which I don't think it is)

>has a pointer value (rather than an integer)

We're going to call type a lot. Type returns either an absolute type number 
or a sub-type. (where subtype is INT/BIGINT/OBJECT for integer type 
queries, NUM/BIGNUM/OBJECT for floats, or one of the variety of string types)

>and
>does isa and can.

For that there's no real reason, since I don't think they're going to be 
called all that often, relatively speaking. OTOH since we're not 
abstracting the rest out, and it doesn't otherwise buy anything at the low 
level, I don't see a point. (Well, not yet at least)

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to