At 07:11 PM 4/20/2001 -0500, Jarkko Hietaniemi wrote:
>On Fri, Apr 20, 2001 at 05:02:21PM -0700, Larry Wall wrote:
> > Jarkko Hietaniemi writes:
> > : What is someone wants to define matrices and have both cross product
> > : and dot product?
> >
> > At some point, there aren't enough operators, and new ones have to
>
>I thought we adopted Unicode for this very reason :-)

   $foo = $bar [SILEY_FACE] 0;

instead of

   $foo = $bar ?? 0;

huh? (We could use the bullseye character for the 'take a memory pointer 
instead of a reference' operation, on the assumption that if you do this 
you're likely to shoot yourself... :)

> > I think it's a mistake to think of the vtable format as fixed.  We need
> > ways to install sets of methods such that they'll dispatch just as fast
> > as any built-in.  This probably involves setting up some kind of a
> > registry for mapping of names to vtable offsets at compile time, for
> > those method names we know about at compile time.
>
>This answers my worry about the extensibility and size of the vtables:
>committing overly much to Perl 5 and trying to implement all of that
>at low levels is to be avoided.  With my multilevel idea I was trying
>to shrink the size of the table and limit the extent of possible
>change, but if we have APIs to runtime rewire (and in compile time
>prewire) the vtables I'm happy.

Resizing the vtable at runtime is a really dodgy thing. There are some 
rather huge threading implications here--changing their size (as opposed to 
using up a limited number of "uncommitted" spots we leave at the end) means 
potentially having to move all the vtables around, which means updating the 
vtable pointers already stuck into variables. This, one could assume, falls 
firmly in the "yuck" category.

Adding to the opcode table, OTOH, is much less of a big deal. Or, rather, 
while it's still a big deal, its much easier to make threadsafe, as we can 
protect the critical sections with less overhead. (As there won't likely be 
nearly the sort of coordination required for this)

                                        Dan

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

Reply via email to