Re: Re: [PHP] TURBOPY cloud framework + IDE beta available NOW

From: Date: Wed, 31 Oct 2012 17:13:49 +0000
Subject: Re: Re: [PHP] TURBOPY cloud framework + IDE beta available NOW
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-319638@lists.php.net to get a copy of this message
On Tue, Oct 30, 2012 at 7:33 AM, marco@behnke.biz <marco@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. What? 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 approach. While OOP is one way to approach programming, it's not the only way. Even Rasmus has said he leans procedurally: http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

« previous php.general (#319638) next »