Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61705 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58514 invoked from network); 24 Jul 2012 17:35:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jul 2012 17:35:27 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 64.22.89.134 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 64.22.89.134 oxmail.registrar-servers.com Linux 2.6 Received: from [64.22.89.134] ([64.22.89.134:56738] helo=oxmail.registrar-servers.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A0/73-42538-FDCDE005 for ; Tue, 24 Jul 2012 13:35:27 -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 4486D3E8041 for ; Tue, 24 Jul 2012 13:35:24 -0400 (EDT) Message-ID: <500EDCC7.1020402@ajf.me> Date: Tue, 24 Jul 2012 18:35:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: internals@lists.php.net References: 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 18:34, Alex Aulbach wrote: > 2012/7/23 Sara Golemon : >> Curious if you could expand on that. Generators are iterators, so not sure >> what you're asking for. > It's the point which is unlogical for me. Maybe it's a question. If > the generator is an object with the implementation of an iterator, why > do we need to have it as _function_? > Much easier to make an iterator with a function than as a class. -- Andrew Faulds http://ajf.me/