Perl6 RFC Librarian wrote:
> 
> This and other RFCs are available on the web at
>   http://dev.perl.org/rfc/
> 
> =head1 TITLE
> 
> Operators: Polymorphic comparisons
> 
> =head1 VERSION
> 
>   Maintainer: Damian Conway <[EMAIL PROTECTED]>
>   Date: 7 August 2000
>   Version: 1
>   Mailing List: [EMAIL PROTECTED]
>   Number: 54
> 
> =head1 ABSTRACT
> 
> This RFC proposes that numeric comparison operators default to stringwise
> comparison when both arguments are non-numeric strings.
> 
> =head1 DESCRIPTION
> 
> Currently the expression:
> 
>         "cat" == "dog"
> 
> returns true.
> 

The problem with this, is that we're removing orthogonality from the
language.

Do we want to say:
  $num1 == $num2 works
  $string1 == $string2 works
  $string1 eq $string2 works
  $num1 == <non-decimal numeric literal> works
  $num1 eq <non-decimal numeric literal> breaks?

I'd rather have it break in a generic way (as it does now), and teach
people what happens, than introduce a more hidden case of failure.

Or do we want to generate syntax errors for the last case above?

Hildo

Reply via email to