>>>>> "NT" == Nathan Torkington <[EMAIL PROTECTED]> writes:

NT> Every compile-time check comes at the cost of a run-time freedom,
NT> though.  All bets would be off if you modified @ISA, reblessed, or
NT> passed objects through non-strict-types-compliant code.  Polymorphic
NT> types also becomes a problem: how to say that it's okay for a variable
NT> to hold a Dog *or* a Cat, because we know that both of them have a
NT> "pet()" method?

Inheretence of interface?

my Pet $Fido = $Cat->new;
my Pet $Felix = $Dog->new;


# Nothing but declarations.

Package Pet;

sub Feed();
sub Play();
sub Wash();
sub Pet();

Though how to tell perl to enforce it.

<chaim>
-- 
Chaim Frenkel                                        Nonlinear Knowledge, Inc.
[EMAIL PROTECTED]                                               +1-718-236-0183

Reply via email to