On Wed, 14 Sep 2005, Luke Palmer wrote:
my Int $int = $num;
Explicit coercion, however, isn't done with context: it is done with the
.as() method: $num.as(Int). I think that's weird.
Not to mention the fact that you might have put an Int there for
typechecking purposes instead of coersion pur
Luke Palmer skribis 2005-09-14 22:21 (+):
> (conversely, is ~ just a Str context applicator?)?
Yes, the way I think of it is that ~ is short for Str(), + is short for
Num(), and ? is short for Bool().
> If a parent class defines a coercion operation, do you get it too
> (and what are the imp
On 9/14/05, Juerd <[EMAIL PROTECTED]> wrote:
> Instead, if you don't want something to coerce, be explicit:
> $foo.does(Blah) or fail;, or even: $foo.isa(Blah) or fail;.)
We've been thinking of changing .isa to something longer, or a method
on .meta, because it's a notion that is often misused. U