Re: Re: Generators in PHP

From: Date: Tue, 24 Jul 2012 18:33:26 +0000
Subject: Re: Re: Generators in PHP
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On 24/07/12 19:32, Alex Aulbach wrote:
2012/7/24 Andrew Faulds <[email protected]>:
But PHP functions usually have side-effects, they aren't strict mathematical functions.
Ah, you might mean str_tok()? Are there more, do you have a list? But we're in PHP-programming-context. You write a function in PHP, you call it and it will return once called. I see there no exeption.
So complaining about this is rather pointless.
I don't complain about the past. I just think now, that if it doesn't behave like a function it shouldn't be called function. A function which returns as an object and is not completed is not a function. And if other languages do so, my argument will be the same. <rising finger with epic mimic, fistulous voice> We need not to make the same mistake again! :) All the array_* functions have side effects. Most class methods, which are also functions, have side effects. Most of the functions I write have side effects. Much of mysql_* has side effects.
PHP is not LISP. -- Andrew Faulds http://ajf.me/

Thread (142 messages)

« previous php.internals (#61719) next »