Smalltalk Best Practice Patterns Volume 1: Coding - Free
Smalltalk Best Practice Patterns Volume 1: Coding - Free
Smalltalk Best Practice Patterns Volume 1: Coding - Free
- No tags were found...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Integer>>addFloat: aFloat^self asFloat addFloat: aFloatFloat>>addInteger: anInteger^self addFloat: anInteger asFloatIn the worst case, Double Dispatch can lead to N x M methods, where N is the number of classes ofthe original receiver and M is the number of classes of the original argument. Practically speaking,the receiver classes are usually related by inheritance and the argument classes are also usuallyrelated by inheritance so many common implementations can be factored out.Give your messages Intention Revealing Selectors.<strong>Coding</strong> <strong>Patterns</strong> page 44 of 147 9/30/2006