Hi,

What's the current meaning of type annotations on type-variables?

For example, if I say...

    my Foo ::x;

...which of these does it mean?

a) ::x (<=) ::Foo (i.e. any type assigned to x must be covariant wrt. Foo)
b) ::x is an object of type Foo, where Foo.does(Class)
c) Something else?

I seem to recall Damian suggesting (a) in order to solve the "what's
the invocant type of a class method" problem[1], but I wasn't sure
whether it was already canon.

Also, can I do crazy stuff like this?

    my $a = ::Foo;
    my ::$a $obj;  # analogous to @$x, where $x is an arrayref


Thanks,

Stuart


[1] <http://www.nntp.perl.org/group/perl.perl6.language/21914>

Reply via email to