Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67511 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30859 invoked from network); 25 May 2013 11:01:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 May 2013 11:01:53 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.175 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.214.175 mail-ob0-f175.google.com Received: from [209.85.214.175] ([209.85.214.175:62003] helo=mail-ob0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F7/D0-25010-02A90A15 for ; Sat, 25 May 2013 07:01:53 -0400 Received: by mail-ob0-f175.google.com with SMTP id xn12so3167322obc.20 for ; Sat, 25 May 2013 04:01:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=9aFBBnEMBMTQvZ30fxd5tKkrf2ZDhuHkA83Oe7bOUO4=; b=D6EdiVHbIJDCvLS91xfyr8AXuG695xCpakI4r/LS1MmcyMoOo+xBe8/IY6avbNC1MX kp2dpv8pXatR9sGIkoR8zG9EStYGHHJcVn1SLjrH3iZHEArnbLA2X0KUKKuVmsezXbSV Y7EHGh++fgMI7gYZLcUDoqrxJZZ4d68J4ye1dcTmeG5y7VsuMdS5fDtOwbnFA4GuDegS SUX43wOwRujxDUbrCN+MAFSqiZoFWPdZex2JnUCqjH/gzDirKZX2glk67nEMhu4NNdi/ q3SnbE5iNA1zuRbAztsPA2S5BiJXUp5ecjEwsf0z+nXL5OzmuXZEaQTLwn27jX+GcB0j 6GLw== MIME-Version: 1.0 X-Received: by 10.60.120.34 with SMTP id kz2mr14258312oeb.17.1369479710021; Sat, 25 May 2013 04:01:50 -0700 (PDT) Received: by 10.60.6.193 with HTTP; Sat, 25 May 2013 04:01:49 -0700 (PDT) Received: by 10.60.6.193 with HTTP; Sat, 25 May 2013 04:01:49 -0700 (PDT) In-Reply-To: <847803070.20130525005329@cypressintegrated.com> References: <6b642a96e673c29dbaf2f239be15f7f6.squirrel@www.l-i-e.com> <519E8ADB.90202@sugarcrm.com> <847803070.20130525005329@cypressintegrated.com> Date: Sat, 25 May 2013 13:01:49 +0200 Message-ID: To: Sanford Whiteman Cc: Etienne Kneuss Content-Type: multipart/alternative; boundary=047d7b33cf2ea4a2af04dd88d7d3 Subject: Re: [PHP-DEV] Cannot call constructor From: tyra3l@gmail.com (Ferenc Kovacs) --047d7b33cf2ea4a2af04dd88d7d3 Content-Type: text/plain; charset=UTF-8 > > This thread arose in response to what is undeniably a bad API > authoring practice (first allowing full ctor override and later > breaking BC without fanfare) Why are we letting the authors of > Richard's library off the hook and putting it on ourselves to develop > hacks? They obviously screwed up. What next? Do we let API consumers > override a `final` that they don't like? Just use the right pattern in > the first place. IMO. > I disagree. It can be perfectly ok to allow the lib to be extended and the constructor extended/replaced with a compatible one. The problem is, that currently there is a scenario(lib didn't had a constructor but now it does) which is a PITA. Either the lib author needs to add an empty constructor into every class just to make sure that it will be there to provide a painless upgrade when the need arises for a constructor otherwise the lib consumer has to write boilerplate to make sure that the parent constructor will be only called whet ot is there. Your example also shows an overengineered solution for a simple problem. I think that this is QoL improvement which can be implemented to have a reasonable gain without any cons. --047d7b33cf2ea4a2af04dd88d7d3--