[Chicago-talk] [OT] Object question - subclass or make two similarclasses

Steven Lembark lembark at wrkhors.com
Sun Feb 1 20:41:04 CST 2004

-- petemar1 <petemar1 at perlmonk.org>

> [OT}:
> I understand that interfaces aren'tnecessary to OOPerl, but has anyone
> ever encountered a situation where it was necessary to enforce "design by
> contract" in OOPerl?

Why wouldn't you want an interface to the class?

Profiles are a pain, but that doesn't mean you can't define
a solid interface.

Design by contract is well-supported, and works (e.g.
Class::Contract). The difference with Perl is that you
explicitly code the tests -- instead of using them as
an error-checking crutch in the compiler.

Steven Lembark                               2930 W. Palmer
Workhorse Computing                       Chicago, IL 60647
                                            +1 888 359 3508

More information about the Chicago-talk mailing list