Sneak Peek: 'The Rule of Least Capability' via Hillel Wayne
Choose the least capable feature/tool/pattern/etc. suitable for a given purpose. This optimizes for the capability/tractability tradeoff: the more things you can do with something, the harder it is to reason about.
Using a less capable thing gives you more tractable thing. Map is less capable than foreach, but that means you know map won’t change the length of a list. Immutable data can do less than mutable data but you’re guaranteed to have the same value.
Reference
← Previous | Next → |
Note on Slopsquatting - Wikipedia via wikipedia.org | Put Names and Dates On Documents via Infrequently Noted |