[development] Time for a new chapter of an endless debate

Darrel O'Pry dopry at thing.net
Mon Jul 3 00:36:34 UTC 2006



On Sun, 2006-07-02 at 20:22 -0400, Darrel O'Pry wrote:

> I'm down on consistencies sake. I'm also into the flexability of arrays.
> Our occasional use of objects don't allow us to do anything useful with
> them. Where we do have objects, they don't have any methods. So whats
> the point of keeping them around?
> 
> .darrel.


Not a very good blanket statement on my behalf, but there are several
places where objects are used without any methods. I think those objects
that have no methods should be converted to arrays. 

I don't think I've seen anything that says objects in php5 are
faster/use less memory than arrays in php4. I've only seen those
comments and mentions in relation to objects in php4 and objects in
php5. (benchmark addicts?)

If we get more consistent code and more consistent behavior between php4
and php5 with arrays, then I think it makes sense and has a founding as
an idea. 

The argument of using which ever fits a situation is kind of lame. Why
use an object if it doesn't have any methods or private variables? What
do you gain? Why we using this complex construct if we just need a
reliable data container that works with php4 and php5.

see: $node & $file  

Is there any real reason for either to be an object? Or was it an
arbitrary decision because someone thinks its prettier and easier to
type -> instead of [' ']. What are we gaining by using StdClass instead
of array? What would we lose by converting to arrays?



More information about the development mailing list