Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93589 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6373 invoked from network); 26 May 2016 21:24:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 May 2016 21:24:14 -0000 Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 217.147.176.214 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.214 mail4-2.serversure.net Linux 2.6 Received: from [217.147.176.214] ([217.147.176.214:46564] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 67/80-17600-D7967475 for ; Thu, 26 May 2016 17:24:14 -0400 Received: (qmail 26825 invoked by uid 89); 26 May 2016 21:24:10 -0000 Received: by simscan 1.3.1 ppid: 26818, pid: 26821, t: 0.0879s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.7?) (lester@rainbowdigitalmedia.org.uk@81.138.11.136) by mail4.serversure.net with ESMTPA; 26 May 2016 21:24:10 -0000 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> Message-ID: <5747697A.7000906@lsces.co.uk> Date: Thu, 26 May 2016 22:24:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <50f5d1c9-d24f-1afe-4c34-70aafd981524@fleshgrinder.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC][Vote] Typed Properties From: lester@lsces.co.uk (Lester Caine) On 26/05/16 21:52, Fleshgrinder wrote: > The concept of reseting objects and reinitializing them is something I > read very often from you. This is against all of OOP. What you are > basically doing is misusing classes as behaviorless anemic containers of > data. Even Smalltalk from the '70s did not encourage this and PHP never > did so either. Just because it is possible does not mean that it is the > proper way. Just make a new instance. ;) 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? This is why I LIKED PHP when I started using it in place of BCB(C++) ... I could build the array of objects and then simply populate it from the database. 'Just make a new instance' is a substantial overhead if the object has a large footprint? Although with all this extra overhead 'delete and create' may be quicker than 'load x'. I do keep thinking that I should simply kick objects into touch and stay with simple associative arrays using classes to manage the elements of the array. I still need exactly the same type and constraint management but rather than direct properties of the object they are simply an array element. This is why I have such a problem with 'array' functions being so different to 'properties' ... in my book they are the same thing! -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk