Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59332 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15416 invoked from network); 2 Apr 2012 21:58:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Apr 2012 21:58:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=sam.e.giles@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=sam.e.giles@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.83.42 as permitted sender) X-PHP-List-Original-Sender: sam.e.giles@gmail.com X-Host-Fingerprint: 74.125.83.42 mail-ee0-f42.google.com Received: from [74.125.83.42] ([74.125.83.42:35645] helo=mail-ee0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9E/3C-43049-1112A7F4 for ; Mon, 02 Apr 2012 17:58:42 -0400 Received: by eekb57 with SMTP id b57so890852eek.29 for ; Mon, 02 Apr 2012 14:58:39 -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=D2hBQEtTz1qxUPqAeOhLg3GBu/2bPDCr+Zu7ly16HGI=; b=y5jMArK/4bW+zL0OtvtPptnwxjAy61BUzLS1rfiLhE9EhikIlbBLySgawlsVnRwOxj s0/f1zRmwoma7a8ZqTxhnzfgZfH1eyiZso1K6xCoCCEvP3IqNPmhQxW9bpglUB73Xy5L 9aixHH3qazhsZUiyzU2e9XY5LW2GXfopHJRpdsA1li52pvniW+PaHiSj1dyA28YxpZ76 pcG0rsvoYdJOYzOoF0OYSnaTKHS5GU3YiWoLe1/qvCooibZo7/cuPuwhSWeVHt3US7L2 RtU04KfG/zkWqqd/bwlBzdh8JGvIqPUHqx/GKdLT4ILl4aeaE126B110CgK9lyk1py+f E48A== MIME-Version: 1.0 Received: by 10.213.29.206 with SMTP id r14mr827910ebc.88.1333403918847; Mon, 02 Apr 2012 14:58:38 -0700 (PDT) Received: by 10.213.30.11 with HTTP; Mon, 2 Apr 2012 14:58:38 -0700 (PDT) In-Reply-To: References: Date: Mon, 2 Apr 2012 22:58:38 +0100 Message-ID: To: Anthony Ferrara Cc: Rasmus Schultz , internals@lists.php.net Content-Type: multipart/alternative; boundary=000e0cd1e03aeccd9b04bcb94acd Subject: Re: [PHP-DEV] resume after exception From: sam.e.giles@gmail.com (Samuel Giles) --000e0cd1e03aeccd9b04bcb94acd Content-Type: text/plain; charset=ISO-8859-1 Sorry, as an add on to my previous, a feature request was opened on the Bug tracker in 2010 #51460 for a yield syntax construct Sam. On Mon, Apr 2, 2012 at 10:51 PM, Samuel Giles wrote: > Hi Anthony, > > Ok, I see that now. I know you're not necessarily saying what's been > proposed is a good idea but I can see a benefit in pythonic style > generators as a separate piece of functionality, implementing a yield > function, has this ever been discussed before? My apologies if this is the > case I've not seen it since I've been following this list. > > I know there is the SPL Iterator, but just as in the example you provided > implementations *can* be verbose and convoluted. > > Cheers, > Sam > > On Mon, Apr 2, 2012 at 10:34 PM, Anthony Ferrara wrote: > >> Sam, >> >> I'm not saying it's a good idea, but this would allow for pythonic >> style generators. http://wiki.python.org/moin/Generators >> >> Just pointing out one potential use-case... >> >> Anthony >> >> On Mon, Apr 2, 2012 at 4:35 PM, Samuel Giles >> wrote: >> > My major concern would be, how does this* really* add to PHP? Perhaps >> I'm >> > missing the point, but what would this allow that can't be done in some >> > form using well defined "patterns", for lack of a better word. >> > >> > I'm not keen on the idea of throwing things such as Interrupts either, >> it >> > doesn't quite fit with their general use case. >> > >> > Sam >> > > --000e0cd1e03aeccd9b04bcb94acd--