Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55545 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69776 invoked from network); 19 Sep 2011 10:35:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Sep 2011 10:35:17 -0000 Authentication-Results: pb1.pair.com header.from=ekneuss@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ekneuss@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.42 as permitted sender) X-PHP-List-Original-Sender: ekneuss@gmail.com X-Host-Fingerprint: 209.85.214.42 mail-bw0-f42.google.com Received: from [209.85.214.42] ([209.85.214.42:33013] helo=mail-bw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 95/6F-14600-3EA177E4 for ; Mon, 19 Sep 2011 06:35:16 -0400 Received: by bkar4 with SMTP id r4so5148129bka.29 for ; Mon, 19 Sep 2011 03:35:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Xl2nHO9J+1CowCGnR3bekJEHyzdhsM8H5Io1bg2PKNA=; b=hBDNrfCCVEpG12szQ59b3wM1K2ITk8mwLBovyjeA68f9Z4wTx21+Gt99EK8ueRIqnH PGJN6g9z5YEmR3860Tl4N5fMs0EqVdbi2gXwWntgX2/gIMG9NhpGi78Y9LDS3BgkofeY hsqrcrMQLFg2t/DqVOsFPHzWZfk8PtWd6T+sA= MIME-Version: 1.0 Received: by 10.204.133.193 with SMTP id g1mr1407885bkt.131.1316428511164; Mon, 19 Sep 2011 03:35:11 -0700 (PDT) Sender: ekneuss@gmail.com Received: by 10.204.59.68 with HTTP; Mon, 19 Sep 2011 03:35:11 -0700 (PDT) In-Reply-To: References: <4E74E5A0.2030006@sugarcrm.com> <4E76320F.6010904@sugarcrm.com> <4E764137.9080507@sugarcrm.com> <4E7708FA.7080802@sugarcrm.com> Date: Mon, 19 Sep 2011 12:35:11 +0200 X-Google-Sender-Auth: jJAv9iRdtAG32vnm3mLdDXSczX8 Message-ID: To: Gustavo Lopes Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=0015175dd6f0c7b8ee04ad48e5f2 Subject: Re: [PHP-DEV] __constructor parameter limitations. From: colder@php.net (Etienne Kneuss) --0015175dd6f0c7b8ee04ad48e5f2 Content-Type: text/plain; charset=UTF-8 On Mon, Sep 19, 2011 at 11:50, Gustavo Lopes wrote: > 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. > There is surely little to be gained here, but that's not really the point. The point is that we are currently diverging from the theory, so we should have a BIG gain of doing so, not the opposite. > > -- > Gustavo Lopes > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Etienne Kneuss http://www.colder.ch --0015175dd6f0c7b8ee04ad48e5f2--