top | item 34075550

(no title)

neilpointer | 3 years ago

You couldn't be more wrong, and a simple Google search of the author was all you had to do lol. It's pretty clear here (given his background) that the author is writing in a style to make the code examples more accessible to a wider audience.

discuss

order

nov21b|3 years ago

As a non-ruby developer, I find the initial example indeed much more readable.

mekster|3 years ago

That's why LOC doesn't mean anything and I find the latter way more readable except for the fact ruby puts "if" behind for a single liner which isn't really comfortable reading.