<jnthn> bytes($string) # how many bytes
This would ofcourse be 100% dependent on what kind of character-encoding you use so I checked some reference material: (http://search.cpan.org/~moritz/Perl6-Str-0.0.3/lib/Perl6/Str...) $s->bytes returns the number of bytes of the NFKC-normalized
and UTF-8 encoded $s. This is subject to change.
While UTF-8 is a good default encoding, it seems odd to tie standard functions into things which cannot be presumed. Without having the ability to specify encoding, you will have one function for UTF-8 and a different one (roll your own?) for every other encoding out there.This, together with "This is subject to change", strikes me as slightly inconsistent and unreliable function.
<sjohnson> will Perl 6 contain a switch / case structure?
<japhb> sjohnson: given/when.
I honestly don't see how in a C-style language, using different names for the exact same construct found in every other C-style language adds any real value.Apart from that, Perl 6 seems to be moving forward. I still think it looks kinda lacking compared to languages I like to use, but like mentioned in the IRC excerpt, language debates tends to get kinda pointless ;)