# Just some feedback on MI

- Thread: https://externals.io/message/18445
- Original archive: https://news-web.php.net/php.internals/18445
- Started by oliver.graetz@arcor.de on 2005-08-25T20:30:34+00:00
- Messages: 5
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #18445 — oliver.graetz@arcor.de — 2005-08-25T20:30:34+00:00

URL: https://externals.io/message/18445#18445

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]

---

## #18446 — Joseph Crawford — 2005-08-25T20:49:39+00:00

URL: https://externals.io/message/18445#18446 · In reply to: #18445

Good feedback :)

delegates +++++

MI ++++++++++++

-- 
Joseph Crawford Jr.
Codebowl Solutions, Inc.
1-802-671-2021
codebowl@gmail.com

---

## #18447 — Marcus Boerger — 2005-08-25T20:51:26+00:00

URL: https://externals.io/message/18445#18447 · In reply to: #18445

Hello Oliver,

  the short answer is we don't want virtual inheritance.

marcus

Thursday, August 25, 2005, 10:30:34 PM, you wrote:

> 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:

> > […]

> 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:

> > […]

> 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*

---

## #18451 — Andi Gutmans — 2005-08-25T22:16:37+00:00

URL: https://externals.io/message/18445#18451

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:
>Oliver Grätz wrote:
>
> > […]
>
>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

---

## #18503 — Stanislav Malyshev — 2005-08-28T08:13:59+00:00

URL: https://externals.io/message/18445#18503 · In reply to: #18445

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
