A good type-inferring system can gather, at compile time, the type of $dog in this construct:No, no it can't. Alas. You have no idea how much I'd like that to be the case.
my $dog = Dog->new();
It's perfectly valid to redefine, at runtime, Dog::new to return a Cat object. Or a FlatTire object.
Good compile-time type inferencing with a language as dynamic as perl is very difficult.
In reply to Re: Re: Fun with Typed Objects 1
by Elian
in thread Fun with Typed Objects 1
by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |