> This seems to be adding a special case. (I.e. only if _both_ are
   > non-numeric will it switch to a cmp operation.)

Well, I'd prefer it to always switch, but I thought that might be argued
against. Since, *this* is being argued against, maybe I'll extend my proposal
:-)

   > I currently fail to switch to 'eq' many times when I should, but the
   > failure mode is obvious. Her the failure mode will be really strange.

I would claim that the failure mode is not obvious: "dog"=="cat" is true????

I often need a generic comparison test (typically for equality of less-than),
and to get it one has to jump through hoops:

        sub generic_eq {
                my $failed;
                local SIG{__WARN__} = { $failed = 1 };
                return $_[0] eq $_[1] || $_[0]==$_[1] && !$failed;
        }

I want generic equality to DWIM. I.e. are these the same (for some
reasonable value of "same").

And "dog"=="cat" is not a reasonable value of "same".

Damian

Reply via email to