RE: [PHP-DEV] PHP's OO Support.
| From: | John Parker | Date: | Mon, 20 Nov 2000 11:24:39 +0000 |
| Subject: | RE: [PHP-DEV] PHP's OO Support. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-38568@lists.php.net to get a copy of this message | ||
Hi.
> JP>> 1. Multiple Inheritance.
>
> Not sure about that. It is too much trouble (especially C++-like MI - it's
> a headache on top of a nightmare).
>
I thought as much.
> JP>> 2. Virtual Base Classes.
>
> What's that?
>
The simple answer: Not an issue if you don't have multiple inheritance.
The more complicate and grown-up answer: A means of ensuring that derived
classes don't inherit two copies of the same class. ie: If classes B and C
both extended class A and class D was derived from B AND C...
> JP>> 3. Private methods (and hence friend functions, etc.)
>
> What for? PHP is not really so strongly-controlled language that you need
> this. Exercise self-discipline and you need no private methods :)
>
True. I'm just thinking about the concept of producing a library once
support for creating standalone 'complied' PHP code exists. In such a
circumstance, it would be nice if you could control what methods are
available to the outside world. (Or even viewable by calling
get_class_methods.) However, as you say this really isn't very PHP like.
> JP>> 4. Passing an object by reference. (Apparently there's a problem if
> the
> JP>> object passed is liable to be used in another object's constructor.
> ie:
> JP>> $test = new BlahClass($this); )
>
> This will be fixed, eventually.
>
Sweet. This would be v.nice for what I'm attempting to produce. Is it
planned for a specific point release or will it just be one of those things
that magically appears one day?
Thought for the moment: 'PHP++' (Run away, etc.)
Regards,
John Parker.