13.07.2015 Views

Smalltalk Best Practice Patterns Volume 1: Coding - Free

Smalltalk Best Practice Patterns Volume 1: Coding - Free

Smalltalk Best Practice Patterns Volume 1: Coding - Free

SHOW MORE
SHOW LESS
  • 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.

Instance VariablesI wrote the section on Temporary Variables before I wrote this section. I was pleased with how thesection on temps came out. I expected this section to turn out to be the same sort of cut-and-dried,“here’s how it goes” list of patterns. It didn’t.The problem is that temporary variables really are all about coding. They are a tactical solution to atactical problem. Thus, they fit very well in the scope of this book.Most uses of instance variables are not tactical. Along with the distribution of computationalresponsibility, the choice of how to represent a model is at the core of modeling. The decision tocreate an instance variable usually comes from a much different mind-set and in a different contextthan the decision to create a temp.I leave this section here, because there are still important coding reasons to create instancevariables, and there are some practical, tactical techniques to be learned when using instancevariables.<strong>Coding</strong> <strong>Patterns</strong> page 60 of 147 9/30/2006

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!