bbatsov/ruby-style-guide — Issue #74: Explanations why one style is preferred to another
Author: gerggggggg
Created: 2012-02-16 17:09:09+00:00
State: open

I realize that it's not always easy to provide explanations for every style recommendation, but I think an explanation of why the recommendation was made will make it easier to remember and follow.

For example,

"Prefer %w to the literal array syntax when you need an array of strings."

Why? Is it just because the syntax is shorter? What if my elements have spaces in them, what should I do then? Knowing why this recommendation was made might help me better make a judgement call on edge cases and will hopefully help me understand when it's OK not to adhere to the recommendation.