3 ms·
"If you want a language where there's only one way to do it, I think there's a language with that exact motto." Be that as it may, in Ruby you should also foll
by carbon8 16y ago
"If you want a language where there's only one way to do it, I think there's a language with that exact motto."
Be that as it may, in Ruby you should also follow conventions, write readable code, use the most obvious choice when possible and avoid being unnecessarily clever. Most of the core principles that Python promotes should also be heeded when writing Ruby code. Ruby gives you the flexibility to choose different options, but that doesn't mean that the flexibility should be abused.
- philwelch 16y agoConventions vary from DSL to DSL. The flexibility doesn't have to be used by the application programmer to be useful. Think of how gemfiles or Rspec would look without optional parentheses in method calls. Even though parens are usually the way to go, sometimes you want different conventions in your DSL.
- oewolf 16y agoAnd it isn't abuse until it is used in a specific abusive way. Having the options available to you isn't abusing it.