Differences Between Perl 5 and Perl 6
<p><pre><code>  Was:    my $len = length($string);
  Now:    my $len = $string.chars;
</code></pre>
My intuitive interpretation of that syntax would be "given a string, return a sequence containing its characters, in order".<p>Or is that overlading on return type, and do you get the behavior I would find intuitive if one assigns to an array?<p>Even if that is true, I find that ugly. I would prefer more explicit code, for example<p><pre><code>   my $len = $string.chars.#;
</code></pre>
Similarly:<p><pre><code>  Was:    $#array+1 or scalar(@array)
  Now:    @array.elems
</code></pre>
(All IMHO)