Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78951 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11770 invoked from network); 18 Nov 2014 19:03:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Nov 2014 19:03:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.208 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.208 imap2-3.ox.privateemail.com Received: from [192.64.116.208] ([192.64.116.208:38854] helo=imap2-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 78/D0-06737-5089B645 for ; Tue, 18 Nov 2014 14:03:34 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 6FD308C0089; Tue, 18 Nov 2014 14:03:31 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap2.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap2.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id pRk34wABHv6Q; Tue, 18 Nov 2014 14:03:31 -0500 (EST) Received: from oa-res-27-29.wireless.abdn.ac.uk (oa-res-27-29.wireless.abdn.ac.uk [137.50.27.29]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 9B1188C0080; Tue, 18 Nov 2014 14:03:30 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) In-Reply-To: <546B9739.6060904@gmail.com> Date: Tue, 18 Nov 2014 19:03:28 +0000 Cc: Ferenc Kovacs , PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: <8C177557-6F67-4A6E-AABB-85B709964FCC@ajf.me> References: <546B0F62.1090705@gmail.com> <546B9739.6060904@gmail.com> To: Stanislav Malyshev X-Mailer: Apple Mail (2.1993) Subject: Re: [PHP-DEV] [RFC] Default constructors From: ajf@ajf.me (Andrea Faulds) > On 18 Nov 2014, at 19:00, Stanislav Malyshev = wrote: >=20 >> Thanks for bringing this up and working on the patch. >> Last time we discussed >> this(http://www.serverphorums.com/read.php?7,712222,712635), there = were >> a couple of people including Anthony and Sanford who were agains this >> feature arguing that it would encourage bad practices so I think it >=20 > Obviously, I disagree with that. I do not see any bad practices it > encourages - if anything, it encourages the good practice of always > calling parent ctor, practice considered so good by many that some > languages make it mandatory. Yes, calling the parent constructor is good practice. That doesn=E2=80=99t= mean we should add this, though. Because this RFC means you can just = blindly call the constructor, whether or not it exists, and expect it to = work. And that is bad: If you don=E2=80=99t know how the parent class = works, you really shouldn=E2=80=99t be extending it. -- Andrea Faulds http://ajf.me/