Hacker News new | ask | show | jobs
by imglorp 2112 days ago
I think it would make sense for chained operations in a mental data flow sense.

    makejunk().filter().last(4) => fourthings
feels better than

    fourthings = makejunk().filter().last(4)
1 comments

Not to me, and other people who use Ruby sparingly
I’m not sure. In shell, I think

  makejunk | grep foo | tail -4 > fourthings
is more popular than

  > fourthings makejunk | grep foo | tail -4
Having said that, I don’t understand why you would add this, but then, I don’t understand the popularity of ruby or other languages that think adding alternative ways to do things most of the time is a good thing.
In shell outside of file manipulation,

  fourthings=$(makejunk | grep foo | tail -4)