Re: Static variable in a class method

From: Date: Thu, 14 Feb 2008 23:14:05 +0000
Subject: Re: Static variable in a class method
References: 1 2 3 4 5 6 7 8 9  Groups: php.general 
Request: Send a blank email to php-general+get-269342@lists.php.net to get a copy of this message
Richard Lynch wrote:
On Thu, February 14, 2008 4:28 pm, Stut wrote:
Richard Lynch wrote:
If a website is complicated enough to need a class hierarchy, then something is wrong in your Design. :-) :-) :-)
I don't think anything ever *needs* a class heirarchy, but I wouldn't say using one indicates a design flaw. Classes themselves are an invaluable tool for creating a logical modular system with reusable components, and IMHO not using them indicates an engineer stuck in the dark ages of software development. But each to their own.
I used classes in Lisp a whole whole whole lot building AI research applications, so I don't think I qualify as stuck in the dark ages... :-) Perhaps it's just that I don't like to work on websites big/complicated enough to need giant class hierarchies... Or that I would rather simplify such a site to the point where it doesn't need said large hierarchy... Or that anything that's supposed to spit out a web page in a splintered second shouldn't be that complicated to start with... Or...
I'm only guessing, but instead of classes I would expect you to have a fair few files that contain lots of functions, correct? Given that non-heirarchical class libraries are effectively the same but with one extra organisational layer (plus access control) I really can't see why you think an application that uses classes would be any more complicated than one that doesn't. From where I'm sitting an application built using classes is likely to be (although not necessarily) better structured than one built without them. -Stut -- http://stut.net/

« previous php.general (#269342) next »