Perl 6 does have 'gradual typing' though. You can define a variant:
my $foo;
my Int $foo;
subset OneToTen of Int where { 1 <= $^n <= 10 }; my OneToTen $foo;
subset Prime of Int where { $^n > 1 and $^n %% none 2 .. sqrt $^n };
Perl 6 does have 'gradual typing' though. You can define a variant:
or a typed variable: or a subtype with arbitrary restrictions Or... (http://rosettacode.org/wiki/Define_a_primitive_data_type#Per...) Perl 6 scares me.