Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94606 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34028 invoked from network); 21 Jul 2016 06:00:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jul 2016 06:00:14 -0000 Authentication-Results: pb1.pair.com header.from=neufeind@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=neufeind@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 91.184.32.3 as permitted sender) X-PHP-List-Original-Sender: neufeind@php.net X-Host-Fingerprint: 91.184.32.3 mail.speedpartner.de Received: from [91.184.32.3] ([91.184.32.3:58915] helo=mail.speedpartner.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 72/1A-52781-BE460975 for ; Thu, 21 Jul 2016 02:00:13 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.speedpartner.de (Postfix) with ESMTP id A1A6C635CE for ; Thu, 21 Jul 2016 08:00:02 +0200 (CEST) Received: from mail.speedpartner.de ([127.0.0.1]) by localhost (mail.speedpartner.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8tGi2hSNkhCN for ; Thu, 21 Jul 2016 08:00:02 +0200 (CEST) Received: from collab.speedpartner.de (collab.speedpartner.de [91.184.32.10]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.speedpartner.de (Postfix) with ESMTPS id E66DE6379A for ; Thu, 21 Jul 2016 08:00:01 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by collab.speedpartner.de (Postfix) with ESMTP id 5EEB912C00BA for ; Thu, 21 Jul 2016 08:00:29 +0200 (CEST) Received: from collab.speedpartner.de ([127.0.0.1]) by localhost (collab.speedpartner.de [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 9uk2QwWIehBd for ; Thu, 21 Jul 2016 08:00:28 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by collab.speedpartner.de (Postfix) with ESMTP id BA87012C00C0 for ; Thu, 21 Jul 2016 08:00:28 +0200 (CEST) X-Virus-Scanned: amavisd-new at collab.speedpartner.de Received: from collab.speedpartner.de ([127.0.0.1]) by localhost (collab.speedpartner.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id hmQWuYyo9uvV for ; Thu, 21 Jul 2016 08:00:28 +0200 (CEST) Received: from localhost.localdomain (ip-109-91-178-251.hsi12.unitymediagroup.de [109.91.178.251]) by collab.speedpartner.de (Postfix) with ESMTPSA id 8C18712C00BA for ; Thu, 21 Jul 2016 08:00:28 +0200 (CEST) References: <5786dd74-8a32-eb16-aec1-77b12d5af1c1@garfieldtech.com> To: PHP internals Message-ID: <9ee1bbf1-5ef6-8fbd-38fc-b277c748e511@php.net> Date: Thu, 21 Jul 2016 07:59:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Pipe Operator v2 From: neufeind@php.net (Stefan Neufeind) On 21.07.2016 06:37, Sara Golemon wrote: > On Wed, Jul 20, 2016 at 8:50 PM, Larry Garfield wrote: [...] > return $this->loadConfig() > |> $arg->useConfig($$) > |> $this->loadUser($$) > |> array_merge($$, $this->userDefaults); > > But the PSR7 example is already contrived as it is. > >> This other recent discussion/proposal for a "Cascade" operator seems like it >> would handle the OOP/method case much better: >> >> http://news.php.net/php.internals/94466 >> >> Note: I am not suggesting one is a substitute for the other; rather, that >> they are complementary by addressing different parts of the problem space, >> and the Pipe RFC should likely not emphasize OOP usage potential as I see >> not a great deal there. I am still in favor of it, but let's not over-state >> its use cases. >> > Fair enough. They certainly complement one another and I wouldn't > argue either is a one-job-fits-all solution. [...] Hi, Would joining the two be an option? If $$ is in the parameter-list, use that as the position for the parameter. If not, use the parameter as first argument? Kind regards, Stefan