3 ms·
this is a typo error actually: Now: my $len = $string.length; http://doc.perl6.org/type/Str#method_length http://doc.perl6.org/type/Str#method_length EDIT:
by rihegher 11y ago
this is a typo error actually:
Now: my $len = $string.length;
http://doc.perl6.org/type/Str#method_length http://doc.perl6.org/type/Str#method_length
EDIT: I don't see any contact section on their page to let them know
- ksherlock 11y agomethod length Perl 6 does not have a length function. See chars or elems.
- nemo 11y agolength is gone. See: http://design.perl6.org/S29.html#Obsolete_Functions http://design.perl6.org/S29.html#Obsolete_Functions "length() This word is banned in Perl 6. You must specify units. In practice, this probably means you want Str.chars(), although it could be Str.bytes(), or even something else. See S32-setting-library/String for details."
- rcthompson 11y agoThat's an interesting design decision, and I suppose it solves the Python problem of "I want to operate on any iterable, except for strings which are technically iterables but I want to treat them as atomic elements." (Incidentally, does Python 3 have a solution to this problem?)
- rihegher 11y agoSorry about that, I've jumped a bit too fast on that one