Re: Proposal for aggregation vs. MI

From: Date: Wed, 10 Apr 2002 21:58:10 +0000
Subject: Re: Proposal for aggregation vs. MI
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-82523@lists.php.net to get a copy of this message
On 10/04/02, "Marcus Börger" <marcus.boerger@t-online.de> 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 prefix syntax). > And as we have no typesystem we cannot use typecasting but another solution. The problem is that if $MI_obj is_a Timer, $MI_obj->Timer isn't the correct thing to do. I still think we need an "as" operator to perform this casting, or a "has_as" operator/function so that an as operator could be coded as a function. --Wez.

« previous php.dev (#82523) next »