Re: [RFC] Pipe Operator
| From: | Jesse Schalken | Date: | Tue, 17 May 2016 12:48:56 +0000 |
| Subject: | Re: [RFC] Pipe Operator | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-93372@lists.php.net to get a copy of this message | ||
On Tue, May 17, 2016 at 9:14 PM, Rowan Collins <rowan.collins@gmail.com>
wrote:
> To reiterate my comments from earlier in the thread, I think the "$id =
> $id" looks really weird here, and spoils the step-by-step layout - and, in
> this case, the symmetry.
>
We have the same thing already when chaining methods on value/immutable
objects, like with PSR-7:
$message = $message
->withHeader('foo', 'bar')
->withAddedHeader('foo', 'baz');
So depending on often that pattern is used, many are probably already used
to seeing "$var = $var ....", myself included.