takaoyama's avatar

Takayasu Oyama

takaoyama

Member since

60

Total Reputation

1

Total Arguments

10

Total Votes for Arguments

Arguments and votes

20

Often, I add static methods to some classes in order to improve readability when I instantiate a new class; the ability of chaining methods directly to the constructor, without the unnecessary parenthesis boilerplate, would remove the need for that.

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

This is good to have.

Properties are useful for exchanging (reading and writing) single values. Properties are good for data binding, etc.

With this RFC we can implement:

  • Validation
  • Trigger events
  • Call methods if there is more to do

Update: About the $field I am not sure. Having a separate backing field can have some advantages.

Share:
Read the RFC: Property Hooks maz avatar
maz
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
15

The idea is a nice one, and one that I would welcome, but this proposal puts forward messy syntax that isn't clear!

Share:
Read the RFC: The Pipe Operator ollieread avatar
ollieread
voted no
1

Either this, or something like a use(*) would make the code easier to read and write. Makes sense to me. All major languages has this feature. I don't understand the push back from the core team.

Share:
Read the RFC: Short Closures 2.0 takaoyama avatar
takaoyama
voted yes
12

It improves the readability and usability of closures that consist of more than one assignment.

Share:
Read the RFC: Short Closures 2.0 alexander avatar
alexander
voted yes
8

Just look at how other languages solve this. C# for example. Make short closures like that.

Share:
Read the RFC: Short Closures 2.0 ricardo avatar
ricardo
voted yes
121

At least once a week, I throw away an array_map because it ended up looking too bloated and go with a classic foreach instead. Short Closures 2.0 without the use(...) block would've solved this problem, just 2 votes...

Share:
Read the RFC: Short Closures 2.0 davi avatar
davi
voted yes
39

Creating traits for default implementation is just a pain. I want syntactic sugar

Share:
Read the RFC: Interface Default Methods marc avatar
marc
voted yes
55

I wrote down some thoughts on this RFC on my blog. I think it's worth rethinking our current definition of what "an interface" is. Especially since many languages are interface default methods as their way of multi-inheritance.

Share:
Read the RFC: Interface Default Methods 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!