Austin Hastings skribis 2004-06-24 14:29 (-0700): > > $foo as boolean > "This is Perl 6. Everything is an object, or at least pretends to > be one. Everything has a .boolean method that returns 0 or 1."
If I understand the current design correctly, having both .boolean and casting via "as" would mean that "$foo.boolean" and "$foo as Bool" and "$foo as Bit" mean the same in boolean context, but the first literally is 1 or 0, the second is true or false and the third is 1 or 0 again. But all this only by default, because every one of these three can be overriden. And actually, I don't think I understand it correctly. It's been a while since I had a feeling of understanding Perl 6 :) Is this complexity really needed? Juerd