5 ms·
I think in the author’s ideal world, we would not have Photocopier, Scanner, and Eraser objects, but rather a Paper object that can copy, scan, and erase itself
by sethg 15y ago
I think in the author’s ideal world, we would not have Photocopier, Scanner, and Eraser objects, but rather a Paper object that can copy, scan, and erase itself.
- languagehacker 15y agoYeah, but good luck trying to reuse the same basic instructions to scan non-paper objects without multiple inheritance.
- epochwolf 15y agoRuby does this with mixin modules :)
- ori_b 15y agointerface ICopyable {...}
- SimHacker 15y agoBack in the days at PARC, that was "IXeroxable".
- encoderer 15y agoSee: Mixins, Traits, Apects. Whatever your language wants to call them, they're fundamentally the same, and solve the issue you're raising.