-
-
Notifications
You must be signed in to change notification settings - Fork 40
Add blog post on pipes. #222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🚀 Deployed on https://deploy-pr-222--thephpfoundation.netlify.app |
Which... gives us mostly the same thing as the long-discussed scalar methods! Only pipes are more flexible as you can use any function on the right-side, not just those that have been blessed by the language designers as methods. | ||
|
||
At this point, pipe comes very close to being "extension functions", a feature of Kotlin and C# that allows writing functions that look like methods on an object, but are actually just stand-alone functions. It's spelled a bit differently (`|` instead of `-`), but it's 75% of the way there, for free. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to add a subheader here if possible. Wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eh, any one of these is somewhat arbitrary. They're an increasing scale of cool implications. I'd say put a 3rd level header on all of them, or on none of them. I lean none, but can do either.
Assorted updates made. I didn't mess with the date yet; I figure Roman can do that once whenever it's ready to go live. |
At Roman's request... This is equal parts RFC summary and background history.
I left out the divisive question of going with Elixir-style pipes, mostly for length. If folks feel it would add to the story I can include that, but I fear it may detract from the rah-rah aspect that I am trying to go for here.
I've put the date a few days out to allow for editing time, but of course re-date it as appropriate.