Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61719 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77748 invoked from network); 24 Jul 2012 18:33:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jul 2012 18:33:50 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 64.22.89.133 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 64.22.89.133 oxmail.registrar-servers.com Linux 2.6 Received: from [64.22.89.133] ([64.22.89.133:48318] helo=oxmail.registrar-servers.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A9/72-01267-D8AEE005 for ; Tue, 24 Jul 2012 14:33:50 -0400 Received: from [192.168.0.200] (5ad32874.bb.sky.com [90.211.40.116]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by oxmail.registrar-servers.com (Postfix) with ESMTPSA id 00225C3003F; Tue, 24 Jul 2012 14:33:46 -0400 (EDT) Message-ID: <500EEA76.1030407@ajf.me> Date: Tue, 24 Jul 2012 19:33:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: Alex Aulbach CC: internals@lists.php.net References: <500EDCC7.1020402@ajf.me> <500EE3B9.8010902@ajf.me> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Generators in PHP From: ajf@ajf.me (Andrew Faulds) On 24/07/12 19:32, Alex Aulbach wrote: > 2012/7/24 Andrew Faulds : >> 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. > > 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/