Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84169 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24913 invoked from network); 2 Mar 2015 14:46:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Mar 2015 14:46:35 -0000 Authentication-Results: pb1.pair.com header.from=rdlowrey@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rdlowrey@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.173 as permitted sender) X-PHP-List-Original-Sender: rdlowrey@gmail.com X-Host-Fingerprint: 209.85.223.173 mail-ie0-f173.google.com Received: from [209.85.223.173] ([209.85.223.173:38009] helo=mail-ie0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 40/51-14834-AC774F45 for ; Mon, 02 Mar 2015 09:46:34 -0500 Received: by iecrd18 with SMTP id rd18so48261081iec.5 for ; Mon, 02 Mar 2015 06:46:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=8MUN6wz4t/Zr0qfjsX7bO5Qdh2ZRZSZqMiOJZ2zmIXg=; b=n6J7tazFwWURrB5iQzjwPD6ffWXJgRhW3VDFG2gg80bQ7B6NH0sA+308wWKDP0WEjV 3Q0q1C6uCs1FOvRY8hN6MKM1oaNP8J8XRfo3GaYjrDmwvYxfv+En7GObux05aI48ECYC aGlQ9XblNycnvLEnGPUfdPSq90Z9Bf7bSdWvYkk6r4cYTh+lLOw0VGeb1+WWMXZTW4X2 qePmaNrnqXbaR9A1CpbELKux+SJRMzUZ2PyI3e3bJ8B9gauhmpKAGuvlfZ2AG5wmeW9x msQyEyQcWgl33AFuFNVpoTeKBKCJE+gYqZ8sEgMThiGF2+6DZiZT8IWhQz513YymJr+e Yc6Q== MIME-Version: 1.0 X-Received: by 10.107.12.13 with SMTP id w13mr36583180ioi.28.1425307591054; Mon, 02 Mar 2015 06:46:31 -0800 (PST) Sender: rdlowrey@gmail.com Received: by 10.50.156.198 with HTTP; Mon, 2 Mar 2015 06:46:30 -0800 (PST) In-Reply-To: References: Date: Mon, 2 Mar 2015 09:46:30 -0500 X-Google-Sender-Auth: EDe-ooVitl23IfcimYRtmaFt_J8 Message-ID: To: Patrick Schaaf Cc: Daniel Lowrey , internals Content-Type: multipart/alternative; boundary=001a113ed654a91ce405104f48d9 Subject: Re: [PHP-DEV] [RFC Discuss] Generator Delegation From: rdlowrey@php.net (Daniel Lowrey) --001a113ed654a91ce405104f48d9 Content-Type: text/plain; charset=UTF-8 On Mon, Mar 2, 2015 at 1:34 AM, Patrick Schaaf wrote: > > Am 02.03.2015 00:52 schrieb "Daniel Lowrey" : > > > > I'd like to initiate discussion on a proposal to implement generator > > delegation via the following new syntax inside generator functions: > > > > yield * > > > > The Generator Delegation RFC is available here: > > > > https://wiki.php.net/rfc/generator-delegation > > I like the feature. The syntax is awful. What about "yield use (expr)"? No new keywords, somewhat gramatical, and currently invalid syntax, as far as I can tell. IMO `yield use (expr)` is awful. Let's note here the unhelpful nature of adjectives like "awful" in technical discussions. That said, I have no special attachment to `yield *`. As noted in the RFC, `yield *` is the syntax used in JavaScript generator delegation. I do see value in using common idioms for existing functionality in other languages. However, I also appreciate how the Python variation `yield from` is both immediately readable and perhaps easier to understand. Pending any implementation difficulties I'm indifferent between `yield from` and `yield *`. I think the functionality is the important thing to take away here; the syntax can be whatever folks want it to be. --001a113ed654a91ce405104f48d9--