Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94469 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73173 invoked from network); 11 Jul 2016 15:44:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jul 2016 15:44:04 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.46 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.46 mail-wm0-f46.google.com Received: from [74.125.82.46] ([74.125.82.46:35281] helo=mail-wm0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A2/A9-22463-2CEB3875 for ; Mon, 11 Jul 2016 11:44:03 -0400 Received: by mail-wm0-f46.google.com with SMTP id f65so68541484wmi.0 for ; Mon, 11 Jul 2016 08:44:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:references:from:to:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=zIbW0yVgESmktCY/j1Eh4usk5tDRb5MTYqR0MpsRcxA=; b=g5f0Yc32JUG1DENvVI4yFPS3BmpXP3a9ELoxfWdph6yYBftczqlt74Y+ufkNktEzgN YL7YnP1kQECAnaxZRbuo5rRZ8FGwy4ppAzmFqyaX9AkcR1DmHIRPEdH1WUT0j5XfNOKN kMU06yN2OkRBA0tLBO6xKP1CR0DAL4xr330ZX1TSJCUEQaszLUOVkuuBBUEpiCOITgaZ gd3fr96lytbmiTJFxLqVavc/TnFKHzKW/0ZCtRjtEVPQdK74pts4yaw8wVFet12Xh/HH J5aJ/gcq0giFkXRIbS3xZBXIvrUNwluugkFDo0AqxBQa6A3kvCKEOPxeqPR8E5/8YoOl +Tfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:references:from:to:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=zIbW0yVgESmktCY/j1Eh4usk5tDRb5MTYqR0MpsRcxA=; b=N6+cSdvG2jYeQPY+IlJ2DPxFhLqcJRXojVoAaIP/m5rtsMrXagx8L6bgSVoftpHFgd whai66RKHtGtXY39ebEUXDbQmzhnKlcutjkUv7Xmm38VyOnFFKBhoAuqBRvKCRFVtM9h du2Xu+g4NIuc0yiwnFy7lBQzV/o88ZBypCqUAK9ZvXGdHI+QnIg2NX3ctar+8DCkrSj4 H5n7C3X0ARe7o5hgal3jCxa5+w5FT5qyxhcNLI9PzlWnPKygzf/ul6cuhQwSMOI5k8zk Xnh8wO9JwrbuIb0PL0B6MxajAZIu0yB80o/jVNIDwLw6Sk8+ibdntET13LGi9P3futA8 wO/g== X-Gm-Message-State: ALyK8tKLtRqmsrhE3SImtEO8S39qZDWibShyIxOI5rA0LaG+NQ9adxwaTR91+QuoyckIQw== X-Received: by 10.28.54.147 with SMTP id y19mr19658944wmh.68.1468251839982; Mon, 11 Jul 2016 08:43:59 -0700 (PDT) Received: from [192.168.0.98] ([93.188.182.58]) by smtp.gmail.com with ESMTPSA id 12sm893716wmj.19.2016.07.11.08.43.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jul 2016 08:43:59 -0700 (PDT) References: <86455a1e-eb57-1f30-9016-ac70c9f30bdd@gmail.com> To: PHP Internals List Message-ID: <9aefb439-80cc-4665-9295-c05a17eb72a9@gmail.com> Date: Mon, 11 Jul 2016 16:42:15 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Cascade Operator (was Re: [PHP-DEV] Proposal for php7 class method return) From: rowan.collins@gmail.com (Rowan Collins) On 11/07/2016 16:33, Marco Pivetta wrote: > Still interested: what's the actual added value of this sort of operator? Arguably, the same value there is any syntax. You could say that the -> operator is just a more readable form of overloaded function calls: class Something { function bar(int $value); } $foo->bar(42); vs function bar(@overload Something $this, int $value); bar($foo, 42); And, indeed, that all operators are just a more readable form of function calls. Chaining syntax makes a certain style of programming easier. It doesn't allow you to do anything that you can't do without it, and the change is mostly cosmetic. Whether that's a good thing or bad thing depends whether you think that's a good style or not. A bit of a non-answer, perhaps, but the question is pretty woolly too. Regards, -- Rowan Collins [IMSoP]