5 ms·
I find the Ruby version clearer because it proceeds from left to right like a shell pipeline. This is an excellent point. Ruby code can be some of the cleanest
by cageface 16y ago
I find the Ruby version clearer because it proceeds from left to right like a shell pipeline.
This is an excellent point. Ruby code can be some of the cleanest, most readable functional code there is. I have these kinds of chained pipelines in my Ruby code all over the place and they're much easier for me to follow than similar expressions in Lisp or Haskell and than Python's comprehensions.