Re: use of static methods after namespaces arrive
| From: | Iv Ray | Date: | Wed, 28 May 2008 16:13:02 +0000 |
| Subject: | Re: use of static methods after namespaces arrive | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-274775@lists.php.net to get a copy of this message | ||
Adam Richardson wrote:
If the functionality doesn't conceptually promote the inclusion of the variables it works on (i.e., no class variables), doesn't conceptually fit a scheme where instances can exist, and likely won't benefit from refactoring into component methods, then I could see using a namespaced function.Here I would do the same.
Most of the time, though, I'd probably start out with a class method instead of a namespaced function so I could more readily adapt to OOP practices if desired as the implementation evolves.Hm... Would you consider it safer to convert a static method into an instance method, than implementing a namespaced function into a (new) class and redirecting the calls? I am not starting a fight, I am really interested in what you think. Iv