Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:25137 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95489 invoked by uid 1010); 2 Aug 2006 17:07:44 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 95460 invoked from network); 2 Aug 2006 17:07:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Aug 2006 17:07:44 -0000 X-PHP-List-Original-Sender: zeev@zend.com X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:2519] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 72/B5-45114-CAAD0D44 for ; Wed, 02 Aug 2006 13:02:38 -0400 Received: (qmail 2369 invoked from network); 2 Aug 2006 17:01:30 -0000 Received: from localhost (HELO zeev-notebook.zend.com) (127.0.0.1) by localhost with SMTP; 2 Aug 2006 17:01:30 -0000 Message-ID: <7.0.1.0.2.20060802200141.084f4040@zend.com> X-Mailer: QUALCOMM Windows Eudora Version 7.0.1.0 Date: Wed, 02 Aug 2006 20:02:32 +0300 To: Pierre Cc: "Robert Cummings" , "Derick Rethans" ,"Lukas Smith" , internals@lists.php.net In-Reply-To: References: <18810497049.20060801234124@marcus-boerger.de> <1154478748.6599.16.camel@blobule> <16.85.45114.FF370D44@pb1.pair.com> <7.0.1.0.2.20060802153423.0d046278@zend.com> <1154531954.3034.24.camel@blobule> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] RfC: rethink OO inheritance strictness From: zeev@zend.com (Zeev Suraski) At 18:22 02/08/2006, Pierre wrote: >On 8/2/06, Robert Cummings wrote: >>On Wed, 2006-08-02 at 16:07 +0200, Derick Rethans wrote: >> > On Wed, 2 Aug 2006, Zeev Suraski wrote: >> > >> > > My recommendation: >> > > - Add a new flag to methods (at the implementation level) that >> will allow to >> > > flag them as 'strict' >> > >> > Have an example of what you mean here? >> >>Maybe something like the following... >> >>> >>class foo >>{ >> function bleh( $p1, $p2 ) >> { >> echo "Bleh: $p1, $p2\n"; >> } >>} >> >>class fee extends foo >>{ >> loose function bleh( $p1 ) >> { >> parent::bleh( $p1, $this->prop ); >> } >>} >> >>?> >> >>I think I like it :D In this case, > >Except that I would prefer the other way 'round. The default should be >the "loose one". Yes, that's what I originally meant. And as I mentioned, in my opinion that's not really all that necessary. Those who care about this kind of stuff will tend to have E_STRICT enabled and will fix it anyway. Zeev