On Mon, Mar 26, 2001 at 03:36:08PM -0500, Dan Sugalski wrote:
> The only issue there is whether memoization is appropriate. It could be
> argued that it isn't (it certainly isn't with perl 5)
Hm. I don't see a linguistic reason why it isn't with perl5. Unless the
comparisign function as a whole is stable (IE {f(a) <=> f(b)}, the sort
function is documented as being undefined.
The only way f(a) can not be stable and f(a) <=> f(b) can be is somthing of
a corner case. In fact, it's a lot of a corner case.
> though I for one
> wouldn't mind being able to more aggressively assume that data was
> semi-constant...
Well, you can. Unless it has magic (and more specificly, scalar get magic).
> (Imagine returning tied data from a function loaded in via
> do(). Imagine the optimizer. Imagine Dan's brain popping out of his head
> and hiding behind the bookcase)
That's a really wierd image. Twisted, even.
-=- James Mastros
--
The most beautiful thing we can experience is the mysterious. It is the
source of all true art and science. He to whom this emotion is a stranger,
who can no longer pause to wonder and stand wrapt in awe, is as good as dead.
-=- Albert Einstein
AIM: theorbtwo homepage: http://www.rtweb.net/theorb/