Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55541 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62269 invoked from network); 19 Sep 2011 10:18:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Sep 2011 10:18:41 -0000 Authentication-Results: pb1.pair.com header.from=glopes@nebm.ist.utl.pt; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=glopes@nebm.ist.utl.pt; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nebm.ist.utl.pt from 85.139.253.17 cause and error) X-PHP-List-Original-Sender: glopes@nebm.ist.utl.pt X-Host-Fingerprint: 85.139.253.17 unknown Linux 2.6 Received: from [85.139.253.17] ([85.139.253.17:22918] helo=alfresco) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 85/DD-14600-007177E4 for ; Mon, 19 Sep 2011 06:18:40 -0400 Received: from localhost ([127.0.0.1] helo=clk-0081.mshome.net) by alfresco with esmtp (Exim 4.72) (envelope-from ) id 1R5avs-0002VX-V1 for internals@lists.php.net; Mon, 19 Sep 2011 11:18:36 +0100 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: internals@lists.php.net References: <4E74E5A0.2030006@sugarcrm.com> <4E76320F.6010904@sugarcrm.com> <4E764137.9080507@sugarcrm.com> <4E7685DE.6010805@sugarcrm.com> <4E768C86.3030307@sugarcrm.com> <4E769418.6040200@sugarcrm.com> <4E770163.2090001@sugarcrm.com> <4E770770.60809@sugarcrm.com> Date: Mon, 19 Sep 2011 11:18:36 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Organization: =?utf-8?Q?N=C3=BAcleo_de_Eng=2E_Biom=C3=A9di?= =?utf-8?Q?ca_do_I=2ES=2ET=2E?= Message-ID: In-Reply-To: User-Agent: Opera Mail/11.51 (Win32) Subject: Re: [PHP-DEV] __constructor parameter limitations. From: glopes@nebm.ist.utl.pt ("Gustavo Lopes") Em Mon, 19 Sep 2011 10:56:03 +0100, Etienne Kneuss escreveu: > > Apparently you guys are speaking about the initial implementation of an > abstract method, while I was talking about overriding a method, which is > not the relly same. So the above doesn't really apply. > > The initial implementation of an abstract method should match the > signature, > while overriding a method should be able to loosen the precondition in > many ways (type hints change, less arguments, etc..), IMO. > I should like to hear why. As far as I can see, there's absolutely no difference. All I've seen in this thread to this respect are semantic pseudo-arguments. I'd say interfaces are much more likely to include more useless parameters than a concrete method definition, which most likely will only include the arguments it actually needs. An example: http://www.google.com/codesearch#HmA4mAI_aLc/src/main/java/terrastore/server/impl/support/JsonBucketsProvider.java&q=implements%5C%20MessageBodyWriter&type=cs&l=36 This is the most common scenario for implementations of this interface (see the other search results). -- Gustavo Lopes