Re: Static and non-static methods
| From: | Sterling Hughes | Date: | Fri, 04 Apr 2003 15:10:44 +0000 |
| Subject: | Re: Static and non-static methods | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-664@lists.php.net to get a copy of this message | ||
On Fri, 2003-04-04 at 09:52, Andrei Zmievski wrote:
> What does everyone think about disallowing non-instance calls to methods
> which are not declared static? Currently, this works:
>
> class A {
> function B() { return 1; }
> }
>
> A::B();
>
> But really, if B was intended to be used that way, it should have been
> declared as static.
>
Well its a BC nightmare, and I don't really see any big advantage.
-Sterling
> -Andrei
> http://www.gravitonic.com/
> * If it ain't broken, it doesn't have enough features yet. *
--
"Reductionists like to take things apart. The rest of us are
just trying to get it together."
- Larry Wall, Programming Perl, 3rd Edition