On Wed, Feb 24, 2010 at 02:20:38PM +0300, Alexey Zakhlestin wrote: > > On 24.02.2010, at 13:28, Alain Williams wrote:
> > Objects are not always the answer. > > in situation, which you described, objects are definitely the answer. > you have several functions, which share the same "state". that's very close > to the definition of object. Maybe 'private static' -- ie shared between different objects. It is not always appropriate, eg a generic logging function, called from all over the place - it is not always convenient to pass a logging object around; you just want to call the logging function. OO is not always the answer. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php Past chairman of UKUUG: http://www.ukuug.org/ #include <std_disclaimer.h> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php