Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71366 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58736 invoked from network); 20 Jan 2014 22:30:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jan 2014 22:30:11 -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.204 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.204 mail4.serversure.net Linux 2.6 Received: from [217.147.176.204] ([217.147.176.204:53636] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 21/2F-02192-073ADD25 for ; Mon, 20 Jan 2014 17:30:09 -0500 Received: (qmail 18259 invoked by uid 89); 20 Jan 2014 22:30:06 -0000 Received: by simscan 1.3.1 ppid: 18253, pid: 18256, t: 0.0673s scanners: attach: 1.3.1 clamav: 0.96/m:52 Received: from unknown (HELO linux-dev4.lsces.org.uk) (lester@rainbowdigitalmedia.org.uk@81.138.11.136) by mail4.serversure.net with ESMTPA; 20 Jan 2014 22:30:06 -0000 Message-ID: <52DDA409.2010602@lsces.co.uk> Date: Mon, 20 Jan 2014 22:32:41 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0 SeaMonkey/2.23 MIME-Version: 1.0 To: internals@lists.php.net References: <20140116110127.202079vzjsj76n7b@webmail.tutteli.ch> <0B.B1.24763.139B7D25@pb1.pair.com> <002001cf12da$2bfbda90$83f38fb0$@tutteli.ch> <52DCA3E7.80602@lerdorf.com> <52DCED71.3020207@pthreads.org> <006301cf15f5$22f8df60$68ea9e20$@tutteli.ch> <52DD90E5.2030205@sugarcrm.com> <52DD9C72.9070409@sugarcrm.com> In-Reply-To: <52DD9C72.9070409@sugarcrm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Introducing "Array Of" RFC From: lester@lsces.co.uk (Lester Caine) Stas Malyshev wrote: > But at least it feels for > me more "natural" - you just generate a bunch of code (there are a > number of cans on worms in it but I ignore it for now). Checking each > element post-factum just feels wrong way to approach it. I write the code for the spanner ... which will only ever create a spanner ... then I call it N times to create the bag of spanners perhaps with a parameter for the size of the spanner. Why do I need something to stop me adding an adjustable wrench to the bag? I just don't call any other code when adding to that bag? But I can also add sockets to the bag if I want different types of nut tools ... There is no 'extra' code, we need the code to creat the basic object anyway? I may want to create a bag with a fixed number of spaces for spanners, so I create a bag of N 'NULL' spaces which I can then upgrade to a spanner object later. These 'NULL' objects are simply sizes of spanner that we don't currently have yet. A more practical example of this would be with my genealogical data where we have spaces for ancestors - parents/grandparents - but these objects have not yet been identified. They are still 'person' objects but we don't need to create an empty person object, just an empty element in the array? We only create a real object when we have the data to create it. -- 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