in reply to Re^2: Interfaces for the masses!
in thread Interfaces for the masses!
An interface (as you describe it, similar to the Java concept) is a degenerate case of a role. A role can provide default (and even parametrized) implementations of the appropriate methods and can disambiguate dispatch at compile time.
Hopefully, Perl 6 will even also be able to dispatch multimethods based on roles.
|
|---|