|
|
|
|
|
by dragonwriter
1242 days ago
|
|
> Some more examples, in Ruby, instead of calling `implement Module`, it uses `include Module` While (as a sibling comment notes) “append” might be better than “include” given other terms used in Ruby, “implement” would be completely wrong. Modules aren’t interfaces; in fact, they are almost exactly the opposite. A class in a language with interfaces declares that it “implements” an interface because the interface provides guarantees, and the class provides an implementation of those guarantees. An included Ruby module provides implementation, not guarantees that the class provides implementations for. “include” describes what it does much better than “implement”. |
|