Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55561 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90481 invoked from network); 20 Sep 2011 17:45:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Sep 2011 17:45:20 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.143 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.143 smtp143.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.143] ([67.192.241.143:54628] helo=smtp143.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 09/01-18228-031D87E4 for ; Tue, 20 Sep 2011 13:45:20 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp14.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 1600C29A75A; Tue, 20 Sep 2011 13:45:18 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp14.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id AF23529A729; Tue, 20 Sep 2011 13:45:17 -0400 (EDT) Message-ID: <4E78D12D.8060707@sugarcrm.com> Date: Tue, 20 Sep 2011 10:45:17 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: Gustavo Lopes CC: "internals@lists.php.net" References: <4E74E5A0.2030006@sugarcrm.com> <4E76320F.6010904@sugarcrm.com> <4E764137.9080507@sugarcrm.com> <4E7708FA.7080802@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] __constructor parameter limitations. From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! On 9/19/11 2:50 AM, Gustavo Lopes wrote: > * It had to be case that the parameters you want to ignore are the last Of course, but that's a very common scenario - important parameters go first, unimportant go last. Or, if I wanted, I could just have blank signature foo() and figure it out in the function. There are many ways to do this, and I see no reason why we must prohibit some of them - it only makes the life of the developers harder. > * 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). Yes, I could - but why would I want do that? Do you see the situation here: we introduce a check that is supposed to *help* me, and now you say I have to *work around* it to actually do what I want to do? Doesn't it sound like contrary to the purpose of helping me? I want the language to assist me in doing what I want to do, not having to wrestle with it by shutting off warnings and introducing useless parameters. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227