News for hackers. Stuff that matters.
Re:Cursed Elixir by antfarm on Monday October 19, 2020 @07:53AM (#24825472)
To me as well, good readability means not having to read too much.

Here is a code example from the front page of the official Python website [python.org]:

  >>> numbers = [2, 4, 6, 8]
  >>> product = 1
  >>> for number in numbers:
  ...    product = product * number
Compared to the Ruby equivalent,

  product = [2, 4, 6, 8].inject(:*)
this feels like unnecessary bloat that makes it harder to understand what is going on in the larger picture, i.e. the unit of code this is a part of.

There are no comments on this comment yet.