Andy_Bach-at-wiwb.uscourts.gov |Perl 6| wrote:
in. Er, so would:
my CGI::Simple $x .= new;
my $y = CGI::Simple.new;

mean that:
$x <whatever the compare class operater is> $y

is not true? Or would there be a way to tell them apart, on a class (?) level.


The actual dynamic type at run time of the values in $x and $y are both CGI::Simple.

The static compile-time type of $y is Any.

$x.nosuchmethod;

will give a compile-time error if nosuchmethod is not declared as part of CGI::Simple.

$y.nosuchmethod;

will look it up when the attempt is made, and only then fail. (Or succeed if something funny is going on and it exists =now= but wasn't declared originally. There are a few documented ways to be funny already.)




Reply via email to