At 11:59 AM 3/28/2001 -0500, John Porter wrote:
>Dan Sugalski wrote:
> >...
> > subs inside the sort sub are called" then life becomes much easier.
>
>Easier for perl.  Don't we want to make life easier for the programmer?
>I mean, in general, it would be nice if there were a way to have
>perl memoize for us, rather than have to arrange it ourself.
>It could benefit a lot of situations besides sorting.

I'm not talking about making it easier on perl so much as making it faster. 
Basically to give us the wiggle room to recognize some simple constructs like

    foo($a) <=> bar($b)

or

    foo($a) cmp bar($b)

and optimize them to a table build and sort. This would work for plain perl 
data structures as well, as we might potentially be doing a fair amount of 
data conversion through the variable vtable interface. (Not to mention the 
issues of data mangling for proper Unicode sorting support)

                                        Dan

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

Reply via email to