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...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
addEmployee: anEmployeeself clearTotalSalary.employees add: anEmployeeremoveEmployee: anEmployeeself clearTotalSalary.employees remove: anEmployeeDon’t just blindly name a Collection Accessor Method after the collection message it delegates.See if you can find a word from the domain that makes more sense. For example, I prefer:employs: anEmployee^employees includes: anEmployeeto:includesEmployee: anEmployee^employees includes: anEmployeeImplement an Enumeration Method for safe and efficient general collection access.<strong>Coding</strong> <strong>Patterns</strong> page 73 of 147 9/30/2006