Re: Re: 'Simple' phpers idea about interfaces/code reuse [was] Re: [PHP-DEV]PHP 6.0 Wishlist

From: Date: Thu, 25 Aug 2005 12:20:54 +0000
Subject: Re: Re: 'Simple' phpers idea about interfaces/code reuse [was] Re: [PHP-DEV]PHP 6.0 Wishlist
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  Groups: php.internals 
Request: Send a blank email to internals+get-18413@lists.php.net to get a copy of this message
Christian Schneider wrote:
Jochem Maas wrote:
I would see this as a optional addition to the syntax of interfaces... i.e. everything works as before but you can add default function bodies which would behave as if it was defined in each class that implements the given interface. if this is a truely evil concept I would very much appreciate a little heads up as to why :-)
One quick thing which comes to mind the the WTF-factor when you implement two different interfaces with two different base implementations. One of the cruxes of multiple inheritance.
does this not also apply to when you implement to different interface that 'share' a common method [name/signature] even when the methods bodies are not defined in the interface declarations? (my apologies for misuse of words such as declare/define/etc :-/) rgds, Jochem ps - thanks for your comments... I'll be hitting the OO/MI literature now ;-)
- Chris


« previous php.internals (#18413) next »