Re: Introducing "Array Of" RFC
| From: | Lester Caine | Date: | Mon, 20 Jan 2014 10:58:05 +0000 |
| Subject: | Re: Introducing "Array Of" RFC | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-71321@lists.php.net to get a copy of this message | ||
Pierre Joye wrote:
As I like this RFC for other reasons (type hinting extension), I tend to think that the use cases presented here can be done in a more efficient way. Someone else mentioned "collections" and it is exactly what it is all about. A collection could be an instance of a given class, which stores only one class type. It prevents on usage/function call checks and checks are done only when adding a member to the collection.To my mind this is a lot more PHP friendly? ... If I am building an array of data then I have the option to create each element as a 'new' construct, or simply cache the data in a manor that a single instance of the object can handle multiple sets of data. A collection of data could potentially be managed in a single instance? -- 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