enumag's avatar

Jáchym Toušek

enumag

Member since

40

Total Reputation

1

Total Arguments

4

Total Votes for Arguments

Arguments and votes

2

Maybe if the function names didn't need to be in quotes... As it is certainly not.

Share:
Read the RFC: The Pipe Operator enumag avatar
enumag
voted no
17

Still hard to read. No extra benefits.

The only clean solution is to use scalar types (string, int, float, boolean) and arrays like objects:

$result = "Hello World"->htmlentities()->split()->map(strtoupper(...))->filter(fn($v) => $v != 'O');

Chain, clean oop, readable, IDE hint, no value parameter, no prefixes and an opportunity to correct the functions inconsistency. It could works beside functions: strtoupper($name) and $name->toUpper().

Share:
Read the RFC: The Pipe Operator hricer avatar
hricer
voted no
34

I see no immediate benefit of the proposed solution over the userland implementations. The RFC mentions a shopping cart example, but I don't think that's cleaner than using league/pipeline or Laravel's pipeline.

It's a bit messy for the simpler examples as well.

Share:
Read the RFC: The Pipe Operator ju5t avatar
ju5t
voted no
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
RSS Feed Contribute Watch on YouTube Our License
© 2024 RFC Vote. This project is open source. Contribute and collaborate with us!