Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68061 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91724 invoked from network); 3 Jul 2013 21:11:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Jul 2013 21:11:30 -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:55879] helo=rproxy2-b-iv.figureone.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 32/D1-15343-08394D15 for ; Wed, 03 Jul 2013 17:11:29 -0400 Received: from localhost ([216.220.114.66]) by rproxy2-b-iv.figureone.com (Brand New Heavy v1.0) with ASMTP id OCO17025 for ; Wed, 03 Jul 2013 14:11:25 -0700 Date: Wed, 3 Jul 2013 17:10:37 -0400 Reply-To: Sanford Whiteman X-Priority: 3 (Normal) Message-ID: <1233362173.20130703171037@cypressintegrated.com> To: Ralf Lang In-Reply-To: <51D477C5.6020907@b1-systems.de> References: <1668753851.20130703140514@cypressintegrated.com> <51D46981.7050902@b1-systems.de> <1579496223.20130703144829@cypressintegrated.com> <51D477C5.6020907@b1-systems.de> 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) > Not that it would be an argument but just for understanding: Do you know > any scripting language which has this? Dropping the "scripting" part... IIRC, C++ calls ctors without arguments automatically like in my 'sequentialBefore' napkin sketch. C# has language-level support for 'sequentialBefore' type logic in its initialization list as well (which helps to smooth away the anti-ness by keeping it out of the ctor code). Also, here's a fascinatingly stupid bug-as-feature in AS3 (which I don't remember anything about, having used it basically procedurally along time ago) http://blogs.adobe.com/cantrell/archives/2008/09/be_careful_how.html. (Call Super hoisting out of conditionals? How could that have seemed like a good idea?) So there is precedent for Contractual Call Super. I don't think the above implementations are ideal, though, so if someone did go down this path I think it should be (a) not automatic but dependent on keyword(s); (b) flexible as far as executing before/after; (c) deeply-thought-through as far as its impact on class hierarchies that expand and contract over time. -- S.