- 30 September 2016
- Patterns Ruby
- Tell, Don't Ask principle in Object-Oriented Programming
There is a great principle in object-oriented programming which says: "Tell, Don't Ask".
This principle tells that we should not ask object about their state, make decision and only then tell them what to do. Rather we should send commands.
There is a good quote about that: