On 05/12/2014 00:08, Marvin Humphrey wrote:
On Thu, Dec 4, 2014 at 2:04 PM, Nick Wellnhofer <[email protected]> wrote:

I guess you need need a separate Transformer class because you want to
exclude concrete methods on Analyzer like Transform_Text()?

Yes.

Why is this a requirement?

Why can't the Clownfish version of "interface" allow both abstract and
concrete methods?

The idea I posted isn't meant to implement interfaces that can be used by Clownfish internally. It's only an approach how to implement an interface-like callback mechanism that doesn't rely on subclassing and makes only a few changes to the current architecture. At least in the Perl case, it doesn't make much sense to allow default implementations for this kind of interface because then the Perl class would have to subclass a Clownfish class. This is what I was trying to avoid.

If we implement interfaces to be used by Clownfish internally, I agree that they should support default implementations.

Nick


Reply via email to