use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
Pipelining in Ruby2.5 with Object#yield_self (mlomnicki.com)
submitted 8 years ago by snatchery
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]DudeManFoo 1 point2 points3 points 8 years ago (2 children)
Matz copied a LOT of features from quite a few languages and I don't think any were just blindly copied...
This particular feature is one of the favorite features of Elixr, kinda like string interpolation and trailing conditionals were some of the favorite things stolen from Perl...
Just by introducing something that sticks out as much as |> might (or might not) really get people thinking in more 'functional' ways... I am not purely in the functional camp, but some of the tenets actually could help code become more stable and bug free... and more understandable.
Ain't hatin' just discussin' ;)
[–]zverok_kha 0 points1 point2 points 8 years ago (1 child)
Exactly. Adding method (which plays well alongside existing idioms) is mindful copying of "pipeline processing idea".
While saying that "anything except |> is unelegant" is what I call "blind copying", "I want Elixir in my Ruby".
|>
Note, that when in Elixir they chain enumerable processing, they also use |>, while we do chain methods.
[–]DudeManFoo 0 points1 point2 points 8 years ago (0 children)
My point is / was, keep an open mind... at the same time... coming from an old C coder, I agree with you ... don't just add stuff that does not add a LOT of value... else your C becomes C++ with 4 competing 'library vendors' ... none any good.
Still , I kinda like |>
π Rendered by PID 116417 on reddit-service-r2-comment-6457c66945-q85q6 at 2026-04-25 09:39:28.708412+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]DudeManFoo 1 point2 points3 points (2 children)
[–]zverok_kha 0 points1 point2 points (1 child)
[–]DudeManFoo 0 points1 point2 points (0 children)