Changeset 22630 for docs

Show
Ignore:
Timestamp:
10/16/08 18:33:01 (3 months ago)
Author:
lwall
Message:

[Differences] various corrections

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • docs/Perl6/Perl5/Differences.pod

    r22629 r22630  
    153153etc. 
    154154 
    155 Parenthesis don't construct lists any more, they merely group. Lists are 
    156 constructed with the comma operator. It has looser precedence than the list 
     155Parenthesis don't construct lists, they merely group. Lists are 
     156constructed with the comma operator. It has tighter precedence than the list 
    157157assignment operator, which allows you to write lists on the right hand side 
    158 wihtout parens: 
     158without parens: 
    159159     
    160160    my @list = 1, 2, 3;     # @list really has three elements 
    161161 
    162 The arrow operator C<< -> >> for dereferncing is gone. Since (nearly) 
    163 everything is a reference, you can directly use the apropriate pair of 
    164 parenthesis for either indexing or method calls: 
     162The arrow operator C<< -> >> for dereferencing is gone. Since (nearly) 
     163everything is a reference, you can directly use the appropriate pair of 
     164parentheses for either indexing or method calls: 
    165165     
    166166    my $lol = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]; 
     
    317317    Now:    $object.method 
    318318 
    319 =head2 Using code references in dynamic method calls is gone. 
    320  
    321   Was: $self.$coderef()  
    322   Now: $coderef(self:) 
     319=head2 Dynamic method calls distinguish symbolic refs from hard refs 
     320 
     321  Was: $self->$method()  
     322  Now: $self.$method()          # hard ref 
     323  Now: $self."$method"()        # symbolic ref 
    323324 
    324325=cut  
     
    331332changing their behaviour for particular types is a simple as adding the 
    332333appropriate multi subs and methods. If you want these to be globally 
    333 available, you have to but them into the C<GLOBAL> namespace, which is 
    334 indicated by an asterisk. 
    335  
    336     multi sub *uc(TurkishStr $str) { ... } 
     334available, you have to but them into the C<GLOBAL> namespace: 
     335 
     336    multi sub GLOBAL::uc(TurkishStr $str) { ... } 
    337337 
    338338    # "overload" the string concatenation: 
     
    398398# XXX needs some brave rewrite 
    399399 
    400 =head1 Documentation 
    401  
    402 You now use <em>kwid</em> for documentation instead of POD. Kwid 
    403 is a wiki-like syntax that is easy to write, and pleasant to read directly. 
    404  
    405 Here is a side-by-side comparison of some of the major features of Pod and 
    406 Kwid: 
    407  
    408      =head1 Big Thing                    = Big Thing 
    409  
    410      =head4 Small Thing                  ==== Small Thing 
    411  
    412      A paragraph of                      A paragraph of 
    413      plain text.                         plain text. 
    414  
    415          # verbatim                          # verbatim 
    416          sub v {                             sub v { 
    417              shift;                              shift; 
    418          }                                   } 
    419  
    420  
    421      =item * foo                         * foo 
    422      =item * bar                         * bar 
    423      =item2 N<> barber                   ++ barber 
    424      =item2 N<> bard                     ++ bard 
    425  
    426  
    427      Something B<strong>!                Something *strong*! 
    428  
    429      Something I<emphatic>!              Something /emphatic/! 
    430  
    431      Some code C<E = M * C ^ 2>!         Some code `E = M * C ^ 2`! 
    432  
    433      Some V<B<escaped>> markup           Some \*escaped\* markup 
    434  
    435      =begin Section_type                 .Section_type 
    436  
    437      =end Section_type                   !Section_type 
    438  
    439      =for Section_type                   :Section_type 
    440  
    441 See L<S26> for details. 
    442  
    443 =cut  
    444  
    445 #S29 
    446400 
    447401=head1 Builtin Functions 
     
    490444=head2 wantarray() 
    491445 
    492 C<wantarray> is superseeded by C<want.list>. Also available are C<want.item> 
     446C<wantarray> is superseded by C<want.list>. Also available are C<want.item> 
    493447and C<want.count>, the latter gives the number of expected values, if 
    494448applicable. 
     
    512466distinctly block-related now, so in fact what you've got there is a 
    513467block that returns the value "February".  The C<<>> and C<<<>>> forms 
    514 are in fact just quoting mechanisms (see below). 
     468are in fact just quoting mechanisms being used as subscripts (see below). 
    515469 
    516470=head2 Built-in functions are now methods 
    517471 
    518 Most (all?) built-in functions are now methods of built-in classes such 
     472Most built-in functions are now methods of built-in classes such 
    519473as C<String>, C<Array>, etc. 
    520474