On Tue, Aug 08, 2006 at 11:42:15 +, Luke Palmer wrote:
> I'm not up-to-date on coersion; last I checked it was hand-wavily
> defined.
Currently it's a unary multimethod:
my $hamburger = $cow.as(Food);
However, the MMD rules are counterintuitive for dispatch rules.
The reason annota
On 8/8/06, Yuval Kogman <[EMAIL PROTECTED]> wrote:
It's much more relevant for:
fun( $x.foo :: Bar );
in order to annotate the return type for a call's context even if
the 'fun' function's signature accepts Any.
Touche, this is independent of type inference.
I'm not up-to-date on coe
Actually this particular example is just like coercion, and it's a
bad one sorry.
It's much more relevant for:
fun( $x.foo :: Bar );
in order to annotate the return type for a call's context even if
the 'fun' function's signature accepts Any.
--
Yuval Kogman <[EMAIL PROTECTED]>
h
On 8/8/06, Yuval Kogman <[EMAIL PROTECTED]> wrote:
On Tue, Aug 08, 2006 at 11:12:11 +0100, Daniel Hulme wrote:
> I may be in a little world of my own here, but isn't this what 'as' is
> supposed to do?
>
> foo($x as Moose);
as is a method invocation not a type annotation... It's related, but
no
On Tue, Aug 08, 2006 at 11:12:11 +0100, Daniel Hulme wrote:
> I may be in a little world of my own here, but isn't this what 'as' is
> supposed to do?
>
> foo($x as Moose);
as is a method invocation not a type annotation... It's related, but
not the same (last I heard)
--
Yuval Kogman <[EMAI
> Is it possible to say this one expression? Haskell's syntax is shiny
> but everybody wants the colon:
>
> foo( ( $x :: Moose ) );
I may be in a little world of my own here, but isn't this what 'as' is
supposed to do?
foo($x as Moose);
--
"Of all things, good sense is the most fairly
Is there any way to type annotate a single expression, without using
a temporary variable?
my Moose $x = $y; # definitely a Moose now, may have been coerced
foo( $x );# foo() doesn't necessarily say it wants Moose
Is it possible to say this one expression? Haskell's syntax is shi