At 03:30 PM 3/30/2001 -0600, Garrett Goebel wrote:
>From: John Porter [mailto:[EMAIL PROTECTED]]
> > Dan Sugalski wrote:
> > >
> > > :contained. Or possibly :irrelevant, since generally
> > > speaking most people won't use it and the optimizer
> > > will have to infer whether it's safe to not execute
> > > the function every time...
> >
> > It shouldn't necessarily have to.
> > If I *tell* it it's safe, that should be the end of the story.
> > It don't get much more optimal than that.
>
>I think he's talking about the 90% of the time that no one explicitly
>declares it, but the optimizer infers that it is "contained" anyway.
John's right, though. Regardless of how a sub looks, if it's marked as
something we can call only when we really need we should respect that. (I
can see it for subs that do reach outside themselves for the info needed to
provide data to sort)
>Speaking of which... how about: "immutable"
Doesn't have the right ring to it, unfortunately. It's not really
immutable, it just has no side-effects.
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk