At 12:33 PM 2/5/2001 -0600, Garrett Goebel wrote:
>From: Edwin Steiner [mailto:[EMAIL PROTECTED]]
> >
> > Branden wrote:
> > >
> > > and the other thing is that creating a
> > > vtable for another type would break all existing types.
> > >
> > > Example: suppose we want compiled regexes (qr/^xyz$/)
> > > to have its own vtable so that we could inspect them
> > > and the regex-engine would interact with them by a clear
> > > interface. If we don't make it at first, adding them later
> > > would probably break scalars, arrays, hashes, and so on.
> >
> > I get your point. But considering what Dan said about *not
> > exporting vtables* I wonder how many data types will
> > directly rely on vtable layout. I would think all data
> > types implemented outside the core will use an additional
> > level of indirection (tie-like callbacks?). So maybe there
> > will only be a hand full of 'very internal' data types
> > depending on the vtables.
>
>I thought one of the benefits of vtables was to facilitate extending support
>for new types?
Yup.
>Does RFC 32 have any place in this discussion?
Not directly. It'll probably be layered on a step or three above vtables.
>And in a possibly related thread which appears to predate the mailing list
>archives:
>
>John Tobey writes (Thu 08/03/00 10:47):
> > 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.
I'm not sure this still applies.
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk