Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61791 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66896 invoked from network); 25 Jul 2012 20:31:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jul 2012 20:31:05 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.173 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.173 smtp173.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.173] ([67.192.241.173:37072] helo=smtp173.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2D/AF-19281-88750105 for ; Wed, 25 Jul 2012 16:31:05 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp7.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id B688425828A; Wed, 25 Jul 2012 16:31:01 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp7.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 6083A258504; Wed, 25 Jul 2012 16:31:01 -0400 (EDT) Message-ID: <50105784.5060207@sugarcrm.com> Date: Wed, 25 Jul 2012 13:31:00 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Sara Golemon CC: "internals@lists.php.net" References: <500EE3B9.8010902@ajf.me> <500EEA76.1030407@ajf.me> <5010138D.5050804@ajf.me> <501015B9.6050704@ajf.me> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Generators in PHP From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > Speaking of parse errors, I'm having trouble parsing this line. I *think* > you're saying that generators are just complex things and that's the way it > should be. I... guess I agree, though I have a lower opinion on the > complexity of generators. Seem like a fairly straightforward concept to > me. They are certainly proven concepts. They're not that complex. They are basically a syntax sugar around iterators, and we already have tons of iterators which are widely used. Actually, it's easier than iterator since you have to implement just one method, not five of them. Of course, it's not a beginner's feature - but we have now many features which require some understanding of the language - like magics, anonymous functions, etc. It doesn't by itself make it inappropriate. If we can make it work in a way that won't be confusing and illogical for people knowing how iterators work, then I think it's OK. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227