I am a PHP developer with works especially using Zend Framework.
From August 2012, I started became a Zend Framework Contributor, now as top 4 Zend Framework 2 contributor listed here : https:/...
Cofounded Host Collective (DiscountASP.net). Cofounded Player Axis (Social Gaming). Computer Scientist and Technology Evangelist with 20+ years of experience with JavaScript!
if you do return early in function, you don’t need
else. Using if is ok imo, with reduceelsewith return early when possible.I love early returns and I use them in codebases that are imperative and OOP.
But when creating a functional codebase, 98% of my functions have a single statement, and that statement is a
return.When you eliminate statements and blocks, you will find that your codebase naturally becomes more functional.