3 ms·
Did you read Eloquent Ruby? Having many ways to do the same thing is intentional in Ruby's design, to try and promote a coding-as-literature style, whereby the
by solatic 5y ago
Did you read Eloquent Ruby? Having many ways to do the same thing is intentional in Ruby's design, to try and promote a coding-as-literature style, whereby the language gives you the tools to write code that is as close to plain English as possible. This is explicitly why Ruby includes "unless" in place of "if not". The more ways that there are to express the same idea, the more tools the programmer has to write code that is easily readable and understandable by others. Human comprehensibility + a comprehensive test suite = long-term maintainability.
- deleted 5y ago[deleted]