Robert Cummings wrote: > On Tue, 2008-02-19 at 21:24 -0800, Nick Stinemates wrote: > >> I said, simply, returning an array of objects was usually an indication >> of poor design. >> > > Please elaborate as to the "why" of it being an indication of poor > design. > > Cheers, > Rob. > I already did... I can condense it, since apparently I wasn't diligent enough in my explanation the first time. I have a feeling that this will probably evolve in to Procedural vs. OO design flame war, which was not the intent nor desire. Please also consider that I am talking about modular/extensible design philosophies (Gang of Four) strongly used in languages like C++/Java. Normally, if you're going to be returning a group of objects from a method you're going to want to do something with them. In this case, why should I expect the client of my library to have to do bulk operations? The less trivial the example the more important it becomes, _especially_ if your method is used more than once! That's twice the amount of code. If that doesn't make sense then my reasoning must be shit. -- ================== Nick Stinemates (nick@xxxxxxxxxxxxxx) http://nick.stinemates.org AIM: Nick Stinemates MSN: nickstinemates@xxxxxxxxxxx Yahoo: nickstinemates@xxxxxxxxx ================== -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php