On Tue, Oct 30, 2012 at 7:33 AM, ma...@behnke.biz <ma...@behnke.biz> wrote:

> In times of testability and several design patters, the use of static
> calls is
> really outdated.
> I understand that you can read and write the invocations of the methods
> much
> faster, but you should think more to the future on that point.


Where is it written that the use of static calls is really outdated?
Functional programming is on the rise, and this is largely because of the
virtues of testability, scalability, and simplified patterns. Using a class
to organize a set of static functions can benefit the code in PHP (allow
for autoloading in PHP because functions can't be autoloaded, essentially
serves as a child namespace, etc.) whilst maintaining the benefits of a
more functional approach (unit testing purely written static functions is
much easier, putting all IO tasks in separate components makes for cleaner
modules, etc.)

I try to emulate functional approaches in PHP, such as what you'd find in
Scala, Clojure, or Haskell, and static calls in PHP can facilitate this

While OOP is one way to approach programming, it's not the only way. Even
Rasmus has said he leans procedurally:


Nephtali:  A simple, flexible, fast, and security-focused PHP framework

Reply via email to