Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:25191 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24909 invoked by uid 1010); 3 Aug 2006 15:26:21 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 24894 invoked from network); 3 Aug 2006 15:26:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Aug 2006 15:26:21 -0000 X-PHP-List-Original-Sender: jochem@iamjochem.com X-Host-Fingerprint: 194.109.193.121 mx1.moulin.nl Linux 2.5 (sometimes 2.4) (4) Received: from ([194.109.193.121:38336] helo=mx1.moulin.nl) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 03/34-44390-C9512D44 for ; Thu, 03 Aug 2006 11:26:21 -0400 Received: from localhost (localhost [127.0.0.1]) by mx1.moulin.nl (Postfix) with ESMTP id CFCD31B8A64; Thu, 3 Aug 2006 17:26:23 +0200 (CEST) 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 30562-19; Thu, 3 Aug 2006 17:26:20 +0200 (CEST) Received: from [192.168.1.106] (bspr.xs4all.nl [194.109.161.228]) by mx1.moulin.nl (Postfix) with ESMTP id D9D26161402; Thu, 3 Aug 2006 17:26:19 +0200 (CEST) Message-ID: <44D21595.1070107@iamjochem.com> Date: Thu, 03 Aug 2006 17:26:13 +0200 User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: Rasmus Lerdorf CC: Pierre , Derick Rethans , Zeev Suraski , internals@lists.php.net, Christian Schneider References: <18810497049.20060801234124@marcus-boerger.de> <44CFDB2B.1010907@cschneid.com> <20060802010156.5be0258c@pierre-u64> <44CFDF89.6010506@lerdorf.com> <7.0.1.0.2.20060802153119.0c2193c0@zend.com> <44D0DB82.1070307@lerdorf.com> <44D1FAF0.5060906@lerdorf.com> <44D209A1.6040909@lerdorf.com> In-Reply-To: <44D209A1.6040909@lerdorf.com> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at moulin.nl Subject: Re: [PHP-DEV] RfC: rethink OO inheritance strictness From: jochem@iamjochem.com (Jochem Maas) Rasmus Lerdorf wrote: > Pierre wrote: >> Hello, >> >> On 8/3/06, Rasmus Lerdorf wrote: >> >>> I'm not all that keen on a new keyword for this. How about using an >>> interface to indicate strictness? Isn't this really what interfaces are >>> all about? >> >> I don't like new keywords either, but I don't see any alternative. I >> also think that interfaces are what should be used. But it seems that >> we are wrong, interfaces do not solve this issue, I'm still unsure >> about the reasons though... > > Well, currently they don't because they don't care about method > signatures, but they could be made to care. Are there reasons beyond that? erm, interfaces do care about method signatures either that or my php5 install is magic: # php5 -r ' interface Foo { function bar($v, $k); } class Qux implements Foo { function bar() {} }' Fatal error: Declaration of Qux::bar() must be compatible with that of Foo::bar() in Command line code on line 2 # php5 -r ' interface Foo { function bar($v, $k); } class Qux implements Foo { function bar($a, $b, $c) {} }' Fatal error: Declaration of Qux::bar() must be compatible with that of Foo::bar() in Command line code on line 2 > > -Rasmus >