On Wed, 2002-04-10 at 22:58, Andi Gutmans wrote:
I still prefer to keep PHP a relatively easy to learn, simple yet powerful
language.
I think this is a huge overkill and prefer going with something like I
proposed.
Anyway the inheritance debates have been going on for years and I doubt
At 00:12 12/04/2002 +0200, Stig S. Bakken wrote:
* Dealing with possible loops:
class a aggregates b {}
class b aggregates a {}
$a = new a;
$a-unknown_method();
Should it be illegal to loop-aggregate classes, or should it be
detected at runtime? I'm not sure.
It can't really be detected but
On Fri, 2002-04-12 at 00:42, Andi Gutmans wrote:
At 00:12 12/04/2002 +0200, Stig S. Bakken wrote:
* Dealing with possible loops:
class a aggregates b {}
class b aggregates a {}
$a = new a;
$a-unknown_method();
Should it be illegal to loop-aggregate classes, or should it be
Hey guys,
I still haven't finished reading the looong thread on aggregation vs.
MI because you guys write so much :)
I would like to make a proposal for a solution which I think would fit PHP
very nicely.
My main concern with MI is that there are many problems with it including
namespace
--- Andi Gutmans [EMAIL PROTECTED] wrote:
Hey guys,
I still haven't finished reading the looong thread on aggregation vs.
MI because you guys write so much :)
I would like to make a proposal for a solution which I think would fit PHP
very nicely.
My main concern with MI is that
At 12:46 10/04/2002 -0700, brad lafountain wrote:
--- Andi Gutmans [EMAIL PROTECTED] wrote:
Hey guys,
I still haven't finished reading the looong thread on aggregation vs.
MI because you guys write so much :)
I would like to make a proposal for a solution which I think would fit
--- Andi Gutmans [EMAIL PROTECTED] wrote:
At 12:46 10/04/2002 -0700, brad lafountain wrote:
--- Andi Gutmans [EMAIL PROTECTED] wrote:
Hey guys,
I still haven't finished reading the looong thread on aggregation vs.
MI because you guys write so much :)
I would like to make a
At 12:46 10/04/2002 -0700, brad lafountain wrote:
--- Andi Gutmans [EMAIL PROTECTED] wrote:
Hey guys,
I still haven't finished reading the looong thread on aggregation vs.
MI because you guys write so much :)
I would like to make a proposal for a solution which I think would fit
BTW:
Have you looked at my patch to handle method calls differently?
Yes and I don't like it. I haven't had time to do timings yet. I was very
busy and will try and do it in the next few days.
hmm
The patch wasn't just for speed it was more for sloving 2 main problems.
class a
At 13:07 10/04/2002 -0700, brad lafountain wrote:
--- Andi Gutmans [EMAIL PROTECTED] wrote:
At 12:46 10/04/2002 -0700, brad lafountain wrote:
--- Andi Gutmans [EMAIL PROTECTED] wrote:
Hey guys,
I still haven't finished reading the looong thread on
aggregation vs.
MI
some thoughts concerning member name collisions:
(i will also demonstrate a common shortcoming that i personally
consider a design flaw that exists both in C++ and in Java - it sure
would be good to avoid the same flaw in PHP - even if MI doesn't
get into ZE2, keep this in mind for the
If you want to access an aggregated object directly you can do:
$obj-Timer-method();
well, that's exactly what shouldn't be done and what polymorphism
is trying to eliminate... consider a huge code library which operates
on an object of class Timer and that we want to reuse this library.
now
PHP isn't a compiled language and we aren't going to start adding casting,
v-tables and so on.
PHP is extremely loosely typed and doing $obj-foo calls the method foo
on $obj. This also allows for things like:
$blah = foo;
$obj-$blah;
and so on.
I really think that people who are looking for
On 10/04/02, Lauri Liinat [EMAIL PROTECTED] wrote:
big_hairy_library_call( (Timer) $MI_obj );
(insert_the_name_of_your_class_here) might be tricky to implement
in the ZE, but I agree with the principle, hence my suggestion
for:
big_hairy_library_call($MI_obj as Timer);
Same thing, slightly
On 10/04/02, Marcus Börger [EMAIL PROTECTED] wrote:
At 23:25 10.04.2002, Lauri Liinat wrote:
If you want to access an aggregated object directly you can do:
$obj-Timer-method();
big_hairy_library_call( (Timer) $MI_obj );
Where is the big difference (first is postfix syntax, second is
i'll try to answer both Marcus and Wez here:
Where is the big difference (first is postfix syntax, second is prefix syntax).
the difference is between whether you have to change *lots* of existing code
or do exactly *one* cast in new code while you write it:
$timer = (Timer) $MI_obj;
On 10/04/02, Lauri Liinat [EMAIL PROTECTED] wrote:
so, Wez - why would you want to introduce yet another
cast operator - the as keyword? while PHP already has
adopted the C-style (new_type)... operator?
Since we don't have a real type system, (type) casting doesn't
actually do what you were
where it goes in more details.
Fab.
- Original Message -
From: Lauri Liinat [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, April 10, 2002 6:15 PM
Subject: Re: [PHP-DEV] Proposal for aggregation vs. MI
i'll try to answer both Marcus and Wez here:
Where
18 matches
Mail list logo