ondrej-vrto's avatar

Ondrej Vrťo

ondrej-vrto

Member since

40

Total Reputation

1

Total Arguments

6

Total Votes for Arguments

Arguments and votes

2

Don't like the syntax

Share:
Read the RFC: Asymmetric Visibility v2 yoshi129 avatar
yoshi129
voted no
2

Agree

Share:
Read the RFC: new MyClass()->method() without parentheses clouetjm avatar
clouetjm
voted yes
2

It just makes sense and also optional, so whoever doesn't like it can go back to using parentheses.

Share:
Read the RFC: new MyClass()->method() without parentheses medabkari avatar
medabkari
voted yes
1

Syntax similar to default, without use statement and short for "return".

function($item) use ($baz) { $this->foo($item + $baz); return $this->bar($item); }

to

fn($item) { $this->foo($item + $baz); => $this->bar($item); }

Share:
Read the RFC: Short Closures 2.0 ondrej-vrto avatar
ondrej-vrto
voted yes
5

It's like Accessors/Mutators in Laravel but native.

Share:
Read the RFC: Property Hooks roman-3 avatar
roman-3
voted yes
65

For me, the most important argument is that the pipeline pattern is a tried and tested pattern, that this RFC builds upon. A couple of examples:

This RFC adds syntax to make using these kinds of pattern much more convenient.

On top of that, there's the argument that multiple modern languages support a pipe operator:

Finally, I've had numerous occasions where a pipe operator would simplify my own code — I have more than a handful real life cases where this would be useful.

Share:
Read the RFC: The Pipe Operator Contributor brent avatar
brent
voted yes
RSS Feed Contribute Watch on YouTube Our License
© 2024 RFC Vote. This project is open source. Contribute and collaborate with us!