At 11:51 AM 8/3/00 -0400, John Tobey wrote:
>Dan Sugalski <[EMAIL PROTECTED]> wrote:
> > > > Feel free to define some recommended functions. Give 'em all upper-case
> > > > names so they don't get confused with real methods. (I hope) A PERL_
> > > prefix
> > > > might not be a bad thing either.
> > >
> > >The only one I feel strongly about here is TYPENAME, which should,
> > >perhaps, be called by Perl's ref() builtin. Hey-- then as a first
> > >try, method calls could do a Perl fetchmeth()! Wouldn't that spiff!
> >
> > Yep. :) Make it one of the vtable entries--that way you can get a generic
> > perl magic cookie pointer and find out what the heck the thing really is.
>
>Making it a data member of the vtable sacrifices extensibility. I
>started doing Perlmacs that way until I realized this.
What, doing a
name = (PMC->vtable[NAME])(PMC);
is inflexible? I'm not talking about embedding data into the vtable, rather
make one of the table entries a pointer to a function that returns the type
name.
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk