Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61839 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11314 invoked from network); 27 Jul 2012 13:27:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jul 2012 13:27:10 -0000 Authentication-Results: pb1.pair.com header.from=theanomaly.is@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=theanomaly.is@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.170 as permitted sender) X-PHP-List-Original-Sender: theanomaly.is@gmail.com X-Host-Fingerprint: 209.85.217.170 mail-lb0-f170.google.com Received: from [209.85.217.170] ([209.85.217.170:38339] helo=mail-lb0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2F/F4-14209-C2792105 for ; Fri, 27 Jul 2012 09:27:09 -0400 Received: by lbgc1 with SMTP id c1so2376748lbg.29 for ; Fri, 27 Jul 2012 06:27:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=/ScXEhHcinVlk5MWyL1sejL0UWgzTNh1Veq1OHlbDsY=; b=V1sdbyEj9wZdWBR8uuFMeCzXKEczPlS/aob9Yos43YzA+VdqsG4WMRcZFxxfS55ET/ xqgtQCuuF27jb697fVbDN6Zt1u13yV/REgIRRbfSzknP/cOzh0AGJypAT47nGwDoKv9q s+Hay7bDgP4dL7Ipcagj4qIBHEC+gIve7nPFYfMm8aKjleOoMLxbn/c9VNef9wMdF+gV 6QDPrukjB5F1u9FZP0OICZmHBOChx9weWLrjTkQAqkFRNAfQJ1kzP6bRzpARKkO33sIQ nnvNc9KRopSaD89BVgvNtfXjU378IV2rtayVFkLOost6Apa5dj4kSrMQoKuqk8dJBEWy q0qg== MIME-Version: 1.0 Received: by 10.152.132.233 with SMTP id ox9mr2596348lab.25.1343395625574; Fri, 27 Jul 2012 06:27:05 -0700 (PDT) Received: by 10.112.26.234 with HTTP; Fri, 27 Jul 2012 06:27:05 -0700 (PDT) In-Reply-To: <50128825.4020902@lsces.co.uk> References: <500EE3B9.8010902@ajf.me> <500EEA76.1030407@ajf.me> <5010138D.5050804@ajf.me> <501015B9.6050704@ajf.me> <501058B9.5050004@lsces.co.uk> <501249B6.5070507@lsces.co.uk> <50128825.4020902@lsces.co.uk> Date: Fri, 27 Jul 2012 09:27:05 -0400 Message-ID: To: Lester Caine Cc: PHP internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Re: Generators in PHP From: theanomaly.is@gmail.com (Sherif Ramadan) > > > Nikita - I am looking for a well reasoned argument as to why generator has > to be added at all! 'Just because it can be' is not a valid argument, but > perhaps you could add to the RFC the performance implication or advantage of > what is being proposed. That would at least be some comparison with the > current methods of doing the same thing? > > If you read the RFC you will see all of these issues are already addressed there. https://wiki.php.net/rfc/generators#performance "You can find a small micro benchmark at https://gist.github.com/2975796. It compares several ways of iterating ranges:" What part of this discussion led you to believe such a ridiculous argument as to why generator were introduced? I'm glad to see that while seeking reason you are also demonstrating it.