On Sun, 27 Aug 2000, Nathan Torkington wrote:

> Dan Sugalski writes:
> > If the vtable stuff goes into the core perl engine (and it probably will,
> > barring performance issues), then what could happen in the
> 
> I have a lot of questions.  Please point me to the appropriate place
> if they are answered elsewhere.
> 
> vtables are tables of C functions?  Perl functions?  Either?

Either. One of the things Larry's said he wants is for most opcode
functions to be writable in Perl, which sort of means to me that anyplace
you can stick a C (well, generic HLL) call you can stick a perl sub call.

> How
> would you use them to handle overloading of operators?  One function
> in the vtable for every operation?

Most of 'em, yup. Basic math, string op, regex binding, and conversions at
the very least. I think.

Basically, rather than a bunch of ops (addition, subtraction, string
concatenation...) we have one "do intrinsic function" op, with a vtable
offset bound into it.

> How does that extend to user-defined operators?

They'll be treated separately, assuming we can abuse the parser to let
'em in. (Which I think we can)

                                        Dan

Reply via email to