On 19/09/12 17:57, Michael Shadle wrote:
If you want to play with OO all day, then use Java. PHP was built on
procedural, and now all you OO fanboys are going nuts with it. :) On a
short-lived web request I see no reason to complicate and obfuscate
the code with OO.
Please explain in detail how object-oriented code obfuscates,
complicates, murders baby kittens, etc.
This is becoming religious now, and a fight I will probably lose, but
think about PHP core, it does not need to actually start having "OO
only" stuff, especially when we're talking about one-line functions.
This is becoming religious now, and a fight I will probably lose, but
think about PHP core, it does not need to actually start having
"Procedural only" stuff, especially when we're talking about one-line
functions.
Next you'll start saying "why can't I do $string = new String();
$string->input($input); $string->replace($output);" or something,
instead of str_replace.
Actually, I have. As an advocate of APIs with consistent argument order
that newbies like me can learn more easily, I *have*, in fact, proposed
that.
You can always build something from a basic simple foundation, which
is how PHP's OO is built anyway. Don't complicate things because of
personal preference. There is no reason it cannot stay a simple
function call or two. Wrap that in as many classes as you wish on your
own time. :)
What's complex about a method call?
--
Andrew Faulds
http://ajf.me/
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php