Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55533 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48848 invoked from network); 19 Sep 2011 09:50:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Sep 2011 09:50:06 -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:65468] helo=alfresco) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A5/EA-14600-D40177E4 for ; Mon, 19 Sep 2011 05:50:06 -0400 Received: from localhost ([127.0.0.1] helo=clk-0081.mshome.net) by alfresco with esmtp (Exim 4.72) (envelope-from ) id 1R5aUE-0002TK-2V for internals@lists.php.net; Mon, 19 Sep 2011 10:50:02 +0100 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes In-Reply-To: <4E7708FA.7080802@sugarcrm.com> Organization: =?utf-8?Q?N=C3=BAcleo_de_Eng=2E_Biom=C3=A9di?= =?utf-8?Q?ca_do_I=2ES=2ET=2E?= References: <4E74E5A0.2030006@sugarcrm.com> <4E76320F.6010904@sugarcrm.com> <4E764137.9080507@sugarcrm.com> <4E7708FA.7080802@sugarcrm.com> To: "internals@lists.php.net" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Date: Mon, 19 Sep 2011 10:50:02 +0100 Message-ID: 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:18:50 +0100, Stas Malyshev escreveu: > On 9/19/11 2:12 AM, Gustavo Lopes wrote: >> Arbitrary as it may be, it's nevertheless reasonably arbitrated given >> how little useful it is to just ignore arguments and how likely it is >> to a >> mistake. > > It is not little useful and it is not likely to make such mistake > without immediately being notified and corrected. In the cases where you do want to ignore arguments (say overgenerous interfaces that give you more information than you need to make a decision), relaxing the parameter checks would not be very helpful: * It had to be case that the parameters you want to ignore are the last * You could just put the arguments in the signature and still ignore them (perhaps also giving them a dummy default value so that they don't have to be passed). So there's little to be gained here. -- Gustavo Lopes