Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89253 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48201 invoked from network); 17 Nov 2015 01:49:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Nov 2015 01:49:24 -0000 X-Host-Fingerprint: 176.249.187.88 unknown Received: from [176.249.187.88] ([176.249.187.88:18882] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2D/66-34372-2A78A465 for ; Mon, 16 Nov 2015 20:49:23 -0500 Message-ID: <2D.66.34372.2A78A465@pb1.pair.com> To: internals@lists.php.net References: <564A547C.9060504@garfieldtech.com> <564A629C.9040709@rochette.cc> <564A69C1.5080208@garfieldtech.com> Date: Tue, 17 Nov 2015 01:47:06 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39 MIME-Version: 1.0 In-Reply-To: <564A69C1.5080208@garfieldtech.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 176.249.187.88 Subject: Re: [PHP-DEV] Immutable modifier From: ajf@ajf.me (Andrea Faulds) Hi Larry, Larry Garfield wrote: > The "everything in the constructor" is the problem. That results in, > essentially, an obscenely long function call that just happens to be > named __construct(). If I wanted something that obscure and hard to > work with I'd just use anonymous arrays. :-) Huh? "with" methods and __construct are not exclusive. In fact, you could have a private constructor and only have "with" methods. Only allowing assignment to properties in the constructor doesn't prevent having a nice API: have your methods call the constructor. I don't see what you're getting at here. -- Andrea Faulds http://ajf.me/