Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93599 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56270 invoked from network); 27 May 2016 08:35:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 May 2016 08:35:37 -0000 X-Host-Fingerprint: 80.177.120.119 marston-home.demon.co.uk Received: from [80.177.120.119] ([80.177.120.119:16970] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C6/62-37127-7D608475 for ; Fri, 27 May 2016 04:35:37 -0400 Message-ID: To: internals@lists.php.net References: <20160525215208.034FC1A801B3@dd1730.kasserver.com> <5fd54aa0-4fdf-c1e7-eae8-765aa89c8498@fleshgrinder.com> <08963b03-8394-6d62-4e5b-393f3fcb5647@fleshgrinder.com> <9e9db70d-d72d-d93e-0c81-18c2aa228618@gmail.com> <409002d8-b5e3-5990-7358-246adc7e3cab@fleshgrinder.com> <57474A08.80807@lsces.co.uk> <6f7403b6-bf22-a12b-dfb2-43fe82983e7d@fleshgrinder.com> <57474F9C.6080104@lsces.co.uk> <1733cfce-001b-1079-e929-88f7dde0f2dd@gmail.com> <57475F27.3090306@lsces.co.uk> <50f5d1c9-d24f-1afe-4c34-70aafd981524@fleshgrinder.com> <5747697A.7000906@lsces.co.uk> <37377d3b-827a-4cfd-580b-e33862084ab6@gmail.com> <5747F02A.2010808@lsces.co.uk> In-Reply-To: <5747F02A.2010808@lsces.co.uk> Date: Fri, 27 May 2016 09:35:26 +0100 Lines: 2 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 16.4.3564.1216 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3564.1216 X-Posted-By: 80.177.120.119 Subject: Re: [PHP-DEV] [RFC][Vote] Typed Properties From: TonyMarston@hotmail.com ("Tony Marston") "Lester Caine" wrote in message news:5747F02A.2010808@lsces.co.uk... > >On 26/05/16 22:36, Rowan Collins wrote: >>> So every time I update the current tree because the client has selected >>> a different initial root I have to destroy perhaps 30 person objects and >>> rebuild the whole lot again from scratch? >> >> In a word, yes: if you have a different set of data, use a different set >> of objects to hold it. >> >> Objects are not memory slots to be re-filled, they represent a specific >> instance of a thing. I disagree completely. In a database system there is no rule that says an object can only hold data from a single row otherwise Martin Fowler, the author of PoEE, would not have patterns that hold data from several rows. When I instantiate one of my table classes it is a valid but empty object. There are two actions I can perform - inject data from the client via the $_POST array, or tell it to retrieve data from the database. This may involve just a single row, or multiple rows. When reading from the database it may even result in zero rows. You are trying to change the language to suit the way that you work without considering the fact that your way is not the only way and this change may not suit the way that others work. As far as I can see this proposal not only does not solve a genuine problem, it adds levels of complexity that will do nothing but increase the WTF! factor for untold numbers of programmers who have been happily using the language for years. -- Tony Marston