[Pdx-pm] Poll: traits
Marvin Humphrey
marvin at rectangular.com
Sat Nov 19 12:40:39 PST 2005
On Nov 19, 2005, at 12:27 PM, chromatic wrote:
> You shouldn't have to inherit from a trait to perform that
> trait. (You should have to declare that you intent to perform that
> trait, but that's a different story.)
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?
Even if it's mandatory you can define it to throw an exception, I
suppose.
sub explode { confess "explode must defined in a subclass" }
Marvin Humphrey
Rectangular Research
http://www.rectangular.com/
More information about the Pdx-pm-list
mailing list