Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:30038 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82490 invoked by uid 1010); 2 Jun 2007 08:44:42 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 82475 invoked from network); 2 Jun 2007 08:44:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jun 2007 08:44:42 -0000 Authentication-Results: pb1.pair.com smtp.mail=jochem@iamjochem.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=jochem@iamjochem.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain iamjochem.com from 194.109.193.121 cause and error) X-PHP-List-Original-Sender: jochem@iamjochem.com X-Host-Fingerprint: 194.109.193.121 mx1.moulin.nl Linux 2.6 Received: from [194.109.193.121] ([194.109.193.121:42773] helo=mx1.moulin.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C7/A1-56977-8FD21664 for ; Sat, 02 Jun 2007 04:44:42 -0400 Received: from localhost (localhost [127.0.0.1]) by mx1.moulin.nl (Postfix) with ESMTP id 7EA8824E075; Sat, 2 Jun 2007 10:44:41 +0200 (CEST) X-Virus-Scanned: amavisd-new at moulin.nl Received: from mx1.moulin.nl ([127.0.0.1]) by localhost (mx1.moulin.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wNRAVm2POswJ; Sat, 2 Jun 2007 10:44:36 +0200 (CEST) Received: from [192.168.1.34] (212-182-168-75.dsl.ip.tiscali.nl [212.182.168.75]) by mx1.moulin.nl (Postfix) with ESMTP id B5DE824DFCD; Sat, 2 Jun 2007 10:44:36 +0200 (CEST) Message-ID: <46612DF0.7090003@iamjochem.com> Date: Sat, 02 Jun 2007 10:44:32 +0200 User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 To: Stanislav Malyshev CC: Michael Wallner , internals@lists.php.net References: <465D8C6B.2000809@php.net> <465DB3A9.6010707@zend.com> <465DBAC6.5080700@php.net> <465F0EA7.7090608@zend.com> <60168.216.230.84.67.1180643634.squirrel@www.l-i-e.com> <884476655.20070601005146@marcus-boerger.de> <465F5595.7040201@zend.com> <46605218.7070706@zend.com> In-Reply-To: <46605218.7070706@zend.com> X-Enigmail-Version: 0.94.2.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [patch] Callbacks bug/change request From: jochem@iamjochem.com (Jochem Maas) Stanislav Malyshev wrote: >> You'd probably do something along those lines if it were possible: >> >> ((ParentClass) $child)->virtualMethod(); > > Looks like bad style to me - why not call child's method and it would, > if needed, pass control to parent? yeah, although I could imagine a situation where your stuck needing to calling parent::method() it smells like bad OO - the same kind of bad smell that people have been told they should avoid when it comes to wanting static interface methods, function signature changing, etc. personally I don't mind the smells, I'm not from the straight-jacket OO side of the street. that said I do feel consistency is a worthy goal and therefore it seems correct to enforce straight-jackets all round - given the general direction/mindset of php's OO functionality it seems that calling parent::method() from outside the relevant $child->method() should be illegal inline with other 'strictness enforcements'. >