in reply to Re: Fun with Typed Objects 1
in thread Fun with Typed Objects 1

A good type-inferring system can gather, at compile time, the type of $dog in this construct:
my $dog = Dog->new();
No, no it can't. Alas. You have no idea how much I'd like that to be the case.

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.

Replies are listed 'Best First'.
Re: Re: Re: Fun with Typed Objects 1
by chromatic (Archbishop) on Apr 02, 2003 at 22:11 UTC

    Good point. Perl is rather different from type inferring languages, isn't it?

      Only in the extent of its dynamism. Lots of the type inferencing techniques are usable, but with great care and some amount of tentativeness.