Re: Static functions Vs Nonstatic functions
| From: | Stanislav Malyshev | Date: | Fri, 28 Nov 2014 22:59:39 +0000 |
| Subject: | Re: Static functions Vs Nonstatic functions | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-79298@lists.php.net to get a copy of this message | ||
Hi!
> It confuses programmers that came from other languages, prevent APIs from
> having meaningful names on static methods and have no other benefit than
> supporting PHP 4 code.
I think this notion of "confuses programmers" sometimes goes too far,
and this is one of the examples. PHP prides itself about having low
barrier to entry, but that doesn't mean you can refuse to learn anything
at all about it and PHP should change to match that.
There's nothing wrong in having static and non-static functions in the
same namespace, and many languages do the same. Some do not, so you
should just remember PHP is the one which does.
--
Stas Malyshev
smalyshev@gmail.com