Search
55 results · page 2 of 3
-
Larry Garfield ·
… a more-functional, mostly-immutable direction (without going all the way to pathological purity like in Haskell). A variant of pipe that is intrinsically built on mutable variables goes against the intent. Yes, PHP is not an inherently immutable language …
-
Bob Weinand ·
… a more-functional, mostly-immutable direction (without going all the way to pathological purity like in Haskell). A variant of pipe that is intrinsically built on mutable variables goes against the intent. Yes, PHP is not an inherently immutable language …
-
Hi I just have one more question to the RFC author, which I see in the implementation, but the RFC is not explicitly noting: Is it intentional that fetching is repeated? I would consider that a bug in the implementation …
-
… a more-functional, mostly-immutable direction (without going all the way to pathological purity like in Haskell). A variant of pipe that is intrinsically built on mutable variables goes against the intent. Yes, PHP is not an inherently immutable language …
-
Caleb White ·
Thank you, the precedence section LGTM now. And overall I don't have any further comments regarding the contents of the RFC. Best regards Tim Düsterhus Awesome! Thank you sir for all your feedback and help! Best, Caleb
-
Hi Thank you. One note regarding “the lowest precedence level, right-associative”. This is not quite correct. While the assignment operators have fairly low precedence, they are not the lowest. As an example, the infamous $foo = bar() or die()`` pattern …
-
Vadim Dvorovenko ·
Yes, I have carefully studied the RFCs and understand that they deal with completely different syntax and use cases. However, both proposals advocate for adding and using the |>= operator. Attempting to use it for both scenarios would result in a …
-
Caleb White ·
Hi everyone, thanks for the feedback. Perhaps weirdly, I am not a huge fan of this RFC. I'm open to pipe-compound operators (the other that's been suggested is a null-safe ?|>, which I'd support), but I …
-
Holly Schilling ·
… argue against this for exactly this reason, but it’s really not that bad. When combined with FCC, PFA, and pipe chaining, it can really condense code. My only hesitation is that what we’re going to end up with …
-
Hi Nick, // before public function makeSlug(string $value): string { $value = $value |> mb_strtolower(...); // ... $number = $this->getNextSlugNumber($value); // checks DB if (0 < $number) { $value .= "-$number"; } return $value; } // after public function makeSlug(string $value): string { $value |>= mb_strtolower(...) ; // ... $number = $this->getNextSlugNumber($value …
-
mickmackusa ·
… operator, while |>= is the erupting volcano operator. ;-) Cheers, Ben Someone on X suggested that it should be called the "weighting operator" :) Best, Caleb "monochromatic South African flag operator" doesn't quite roll off the tongue like I'd wish. mickmackusa
-
Caleb White ·
… as a syntax and has a clear meaning once understood. This is the example that made me really love the <> operator (with PFA): $array |>= array_map(transform(…), …); Glad you like it! I think it will really clean up a lot …
-
Caleb White ·
Ooooh, fun. Can we informally call |>= the "volcano operator" (like ?: is the Elvis operator)? ...if only Hershey's Kisses had two paper strips coming out of the top. mickmackusa I like to think of |> as the volcano operator, while …
-
Caleb White ·
Thank you. One note regarding “the lowest precedence level, right-associative”. This is not quite correct. While the assignment operators have fairly low precedence, they are not the lowest. As an example, the infamous $foo = bar() or die()`` pattern …
-
Hi The only thing I'm missing for the semantics is an explicit explanation of the operator precedence and associativity (it has the same precedence and associativity as any other assignment operator; but this needs to be in the RFC …
-
Caleb White ·
Conceptionally I like the idea of having an “in-place modification operator” for function calls and the semantics of the operator seem to be consistent with the existing “modify-assign” operators we have, particularly also with regard to operand …
-
Hi I'd like to open discussion on my (first!) RFC for the pipe assignment operator (|>=): https://wiki.php.net/rfc/pipe_assignment_operator I've given the RFC a read now and have the following comments: Conceptionally I like …
-
Holly Schilling ·
… type on the standard US Keyboard layout, but its readable as a syntax and has a clear meaning once understood. This is the example that made me really love the <<Exploding Volcano>> operator (with PFA): $array |>= array_map(transform(…), …); Holly
-
Ben Ramsey ·
… the "volcano operator" (like ?: is the Elvis operator)? ...if only Hershey's Kisses had two paper strips coming out of the top. mickmackusa I like to think of |> as the volcano operator, while |>= is the erupting volcano operator. ;-) Cheers, Ben
-
mickmackusa ·
Ooooh, fun. Can we informally call |>= the "volcano operator" (like ?: is the Elvis operator)? ...if only Hershey's Kisses had two paper strips coming out of the top. mickmackusa