Changeset 23242

Show
Ignore:
Timestamp:
02/02/06 07:26:32 (3 years ago)
Author:
larry
Message:

Added fake =~ operator to catch the otherwise uncatchable "$a =~ /foo/" mistake.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • doc/trunk/design/syn/S03.pod

    r23237 r23242  
    1313  Maintainer: Larry Wall <larry@wall.org> 
    1414  Date: 8 Mar 2004 
    15   Last Modified: 25 Jan 2006 
     15  Last Modified: 1 Feb 2006 
    1616  Number: 3 
    17   Version: 11 
     17  Version: 12 
    1818 
    1919=head1 Operator renaming 
     
    104104=item * C<^^> is the high-precedence version of C<xor>. 
    105105 
    106 =item * C<=~> becomes the "smart match" operator C<~~>, with a whole new 
    107 set of semantics.  Anywhere you used C<=~> before you now use C<~~>, but  
    108 C<~~> is much more general now.  See L<Synopsis 4> for details. 
     106=item * C<=~> becomes the "smart match" operator C<~~>, with a whole new set 
     107of semantics.  Anywhere you used C<=~> before you now use C<~~>, but C<~~> is 
     108much more general now.  See L<Synopsis 4> for details.  (To catch "brainos", 
     109the Perl 6 parser defines an C<< infix:<=~> >> macro which always fails at 
     110compile time with a message directing the user either to use C<~~> instead, 
     111or to put a space between if they really wanted to assign a stringified value.) 
    109112 
    110113=item * Unary C<.> calls its single argument (which must be a method, or an 
     
    137140variants C<.*>, C<.?>, and C<.+> to control how multiple parent methods 
    138141of the same name are handled.  The C<.=> operator does inplace modification 
    139 of the object on the left. 
     142of the object on the left.  The C<.^> operator calls a class metamethod. 
    140143 
    141144=item * Unary C<=> reads lines from a filehandle or filename, or in general