Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68051 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69881 invoked from network); 3 Jul 2013 18:06:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Jul 2013 18:06:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=swhitemanlistens-software@cypressintegrated.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=swhitemanlistens-software@cypressintegrated.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain cypressintegrated.com designates 173.1.104.101 as permitted sender) X-PHP-List-Original-Sender: swhitemanlistens-software@cypressintegrated.com X-Host-Fingerprint: 173.1.104.101 rproxy2-b-iv.figureone.com Windows 2000 SP2+, XP SP1 (seldom 98 4.10.2222) Received: from [173.1.104.101] ([173.1.104.101:54985] helo=rproxy2-b-iv.figureone.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C4/C6-30639-C0864D15 for ; Wed, 03 Jul 2013 14:06:05 -0400 Received: from localhost ([216.220.114.66]) by rproxy2-b-iv.figureone.com (Brand New Heavy v1.0) with ASMTP id OZJ00902 for ; Wed, 03 Jul 2013 11:06:02 -0700 Date: Wed, 3 Jul 2013 14:05:14 -0400 Reply-To: Sanford Whiteman X-Priority: 3 (Normal) Message-ID: <1668753851.20130703140514@cypressintegrated.com> To: Terence Copestake In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] New feature: sequential constructors From: swhitemanlistens-software@cypressintegrated.com (Sanford Whiteman) I suggest you read this recent thread for related commentary. http://www.serverphorums.com/read.php?7,712222 In there, I refer to your proposal as Contractual Call Super and I find it an interesting concept that helps avoid the "advisory call super" antipattern. However -- > If the introduction of a new keyword is problematic, perhaps this same > behaviour could be enacted in cases where an inheriting class has a > constructor and the base class' constructor is defined as final i.e. rather > than causing an error, the final constructor is executed first, followed by > any other constructors in the hierarchy. -- this is a horrible idea. `final` has distinct semantic meaning. It means "cannot override." It doesn't mean "overrideable, but we'll call any/all supers before/after we run yours." It's a BC break. Fuggedaboutit. The feature you want isn't in the language -- maybe it should be -- and you can't change the meaning of existing keywords. -- S.