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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to