[Pdx-pm] Poll: traits

Ovid publiustemp-pdxpm at yahoo.com
Sat Nov 19 12:50:02 PST 2005

--- Marvin Humphrey <marvin at rectangular.com> wrote:

> That sounds like a Java interface.  Ovid indicated that you could  
> define the default behavior of a Trait -- unlike interfaces.  Is  
> defining a Trait's default behavior mandatory or optional?

Currently defining the trait's behavior is mandatory.  If you don't
like the behavior, exclude the method.

Perl 6's "Roles" will allow you to provide a stub method and then the
role will behave like an interface.  I'm not sure if I will be adding
support for this as the "@REQUIRES" array (described in other emails)
takes care of this need.


If this message is a response to a question on a mailing list, please send
follow up questions to the list.

Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/

More information about the Pdx-pm-list mailing list