Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93256 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11058 invoked from network); 11 May 2016 23:49:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 May 2016 23:49:26 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.52 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.52 mail-pa0-f52.google.com Received: from [209.85.220.52] ([209.85.220.52:34045] helo=mail-pa0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 83/15-28272-505C3375 for ; Wed, 11 May 2016 19:49:25 -0400 Received: by mail-pa0-f52.google.com with SMTP id r5so23465539pag.1 for ; Wed, 11 May 2016 16:49:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=3+L/jZ/xReTPt6WXS7Y4k1w901L8S58vvu6v+GMq5ug=; b=CfuS6uZ+2fsYYWYUhNRz6qCanlDhzrxIF54cvuKF6TSRMjlQldFRcteIw5D2jmZDQF STG3ZACh64su09gS0BBlzbFYjjrt7I24ZN/qlJ2yOXz8n8NvziHLlg/FnzgB+K1H0bIW vpesu8ypUuuIHp8GEBJsIsTZYJy+C8wD1g4M/+y1Qj8Cs4rs/F5FxaoXMZu+xtA9pEmY WwprcsJ67U+m3gkq1zkVxM4ZMwPAEmXjI7elw6rVK3lgoaQ3B85YrT4EwW2777XckTkP bH9D4tCEt6uRCNmgzNWjagMN0CkOV6sPlDmrhlfFYKxch12JuoTjCliqGK91W1WdYylq j9PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=3+L/jZ/xReTPt6WXS7Y4k1w901L8S58vvu6v+GMq5ug=; b=OWtlDV9sZpUbPiQSHZM/ySdL64vFBAFlXi3UlkdcKHnU4D0vUT29L+PcWIIsYdMvHo 9lAm4vkSXM7HFXxzJmruBH9N99QCSe71sHI8ihqxD7okCkx3PzTnu8Gcfdquoa4XKhL8 E+L0Myw5+4C4pZs6AHbZuvCL+uoukHOeuCDkrawyEwIYqkVgFEayQ1eABJ/6PNpjCl2g ZXlaECiz8hO8go2jAmBEa+5Tv5qZlCKBpFDRAbKU1pipq4UolhvL1d1NwHlKNF50Dd9c aFeVfovqKmugKqecARqcQUzeuZNWDOoCMogMae6pVft6WtJEhOZaWo1dNa8ehqvMRpDr bRVA== X-Gm-Message-State: AOPr4FVb25UtE9FFs1J/p797cPeHtMao5GuHsv8LVVViUIzC4/us5dc0AcNAr9fmdOFK4g== X-Received: by 10.66.222.100 with SMTP id ql4mr9032288pac.137.1463010562670; Wed, 11 May 2016 16:49:22 -0700 (PDT) Received: from Stas-Air.local (76-220-46-95.lightspeed.sntcca.sbcglobal.net. [76.220.46.95]) by smtp.gmail.com with ESMTPSA id m184sm14844983pfb.22.2016.05.11.16.49.20 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 11 May 2016 16:49:21 -0700 (PDT) To: Larry Garfield , internals@lists.php.net References: <0ac3be89-6fb4-610a-ef89-0928f264f96c@fleshgrinder.com> <71379db5-b7b8-78b3-ada5-eee34e6e22d6@fleshgrinder.com> <452ddb93-1f47-1d0f-4f24-bedbff506b27@gmail.com> <98.61.11104.A1D41375@pb1.pair.com> <7c94ca37-e188-dd2b-a66f-bb63bf03041a@gmail.com> <1463008795.1856219.605250569.74618FC4@webmail.messagingengine.com> Message-ID: <0e5e2ac8-c003-7000-ecdd-bef6b430e525@gmail.com> Date: Wed, 11 May 2016 16:49:18 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <1463008795.1856219.605250569.74618FC4@webmail.messagingengine.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Pipe Operator From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > If the issue is $$ feels too Perl like, what is the alternative? Is > there another way to chain methods cleanly? Well, that's a loaded question. It presumes we already agreed on needing to chain methods using special syntax outlined in the RFC - which we didn't - and the only problem is whether it's $$ or $* or @% or some other sequence of symbols. I'm not convinced at all of the premise, so discussing which exactly two characters should be used for $$ does not really appeal to me. > In a sense, what we're really talking about here is continuations. Not sure how it's continuations: https://en.wikipedia.org/wiki/Continuation If anything, generators look like continuations. This just looks like fancy way to write sequence of function calls with novel syntax. Do you mean something else by "continuations"? Or I missed some part of the RFC? > a series of single parameter functions. So what if we were to limit the > concurrency syntax to single-parameter functions? And if you want to > reduce a multi-parameter function to a single parameter function, yay > closures. I'm not sure where "concurrency syntax" comes from. What's concurrent here? > Either way, I firmly believe that more functional-friendly capabilities > like continuations, promises, etc. are a direction that PHP needs to > move, and syntax in that direction is valuable. I'm not sure that's where PHP *needs* to move, but we already have continuations, as I mentioned. As for other async capabilities like promises/futures, that may be possible but there are some hard questions need to be answered here because PHP is not well suited for environment sharing. I also am not sure functional syntax is well suited for PHP, given that PHP is not a functional language and vast majority on PHP code is not written in functional manner. Functional programming requires quite different approach than most PHP applications take, and frankly I'm not sure why this should change - there are enough functional languages around. Of course, that doesn't mean avoiding *all* functional features - some of them make total sense even in non-functional language, like closures or functions like map/reduce/filter. Some, however, are harder to fit. -- Stas Malyshev smalyshev@gmail.com