Just some feedback on MI

php.internals

Oliver Grätz

21 years ago
Hello gods of PHP development ;-) I'm just a PHP-programmer, but I've been reading the PHP6 discussions here for a while, especially the talk about MI vs interfaces. I've been all for MI up to the moment where Marcus Boerger came up with this:
> class Document implements Printable { > delegate Printable $print; > > function __construct() { > $this->print = new PrintHandler($this); > }
This combines the pros of MI with the advantages of "favour composition over inheritance". I took this snippet an posted is an argument against MI on our team's private newsgroup server. Then there was a reaction that left me baffled:
> MI in PHP? Sure, they have to. MI being polarising is no reason that > it shouldn't be implemented. MI can be very handy and it belongs in > a language used by people that want quick solutions. People being > all against it for academic or paedagogic reasons have simply > chosen the wrong battleground for their disussions.
This is a valid argument. PHP has always been the BORG language that assimilates every positive aspect of other languages. Nowadays PHP users can use complex class hierarchies, interfaces, expections ans a lot more. But they may still use simple functions and use "global" for their variables. So why not? Give the "users" namespaces and hide them if they don't use them (global namespace for all existing code). Give them multiple inheritance but retain the interfaces. And first of all, implement Marcus Boergers suggestion for native "delegates". *g* AllOLLi ____________ "Help? Moi?" [Sawyer on LOST 115]

Joseph Crawford

21 years ago
Good feedback :) delegates +++++ MI ++++++++++++
-- Joseph Crawford Jr. Codebowl Solutions, Inc. 1-802-671-2021 codebowl@gmail.com

Marcus Börger

21 years ago
Hello Oliver, the short answer is we don't want virtual inheritance. marcus Thursday, August 25, 2005, 10:30:34 PM, you wrote:

Lukas Smith

21 years ago
Oliver Grätz wrote:
> This is a valid argument. PHP has always been the BORG language that > assimilates every positive aspect of other languages. Nowadays PHP users > can use complex class hierarchies, interfaces, expections ans a lot > more. But they may still use simple functions and use "global" for their > variables.
No, PHP has always been the language imho that lets me download some code and quickly understand what it does (as well as quickly being able to determine its crap), versus other languages like Perl or C++ that promote non obvious code. regards, Lukas

Andi Gutmans

21 years ago
Guys, We're wasting bandwidth here and it's really hard to stay focused on real issues. We took the decision a while ago to go with interfaces and not do MI (rightly so). I suggest that the newcomers to the list (Lukas not you), who are advocating for it, go and read the archives. It's not worth discussing any longer... Sorry but it's just becoming impossible to keep up with internals@. It's like a broken record where we are rehashing stuff over and over again; and the important new development topics (like Unicode) are getting lost. Andi At 03:07 PM 8/25/2005, Lukas Smith wrote:

Stanislav Malyshev

21 years ago
OG>>This is a valid argument. PHP has always been the BORG language that OG>>assimilates every positive aspect of other languages. Nowadays PHP users Who said multiple inheritance is positive aspect?
-- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115