On Monday 18 February 2008, Nick Stinemates wrote: > >> I have found, however, that if I ever need to return /multiple/ values, > >> it's usually because of bad design and/or the lack of proper > >> encapsulation. > > > > You mean you've never had a function like getCoordinates()? Or > > getUsers(), or any other of a zillion perfectly valid and reasonable > > functions that return multiple values as an array? Wow, how odd! > > > > Cheers, > > Rob. > > getCoordinates() would return a Point object > getUsers() would return a Group object... > > Not rocket science ;) I wouldn't consider an array of user objects to be "multiple things". I consider it a single aggregate thing, and return arrays all the time. That's conceptually different from wanting two separate return values from a function, which is indeed conceptually icky. -- Larry Garfield AIM: LOLG42 larry@xxxxxxxxxxxxxxxx ICQ: 6817012 "If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it." -- Thomas Jefferson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php