On 22-Mar-2000, Qrczak <[EMAIL PROTECTED]> wrote:
> On Wed, 22 Mar 2000, Fergus Henderson wrote:
>
> > Actually, that raises an interesting question:
> > should instances of `==' be required to be hyperstrict
> > in cases where they return `True'?
>
> Certainly no.
>
> First, using (==) for that purpose is a hack.
OK, you convinced me on that point. Thanks.
> > Suppose Sven implements his `len' function as above, and furthermore
> > implements a library which depends on this function being hyperstrict.
>
> It generally cannot depend on it. Strictness only improves efficiency and
> narrows cases when a function is defined, but it can never improve
> correctness. There is no code that requires strictness to work at all.
Sometimes efficiency is important, and it is quite possible for
a function to depend on strictness for reasonable performance.
--
Fergus Henderson <[EMAIL PROTECTED]> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED] | -- the last words of T. S. Garp.