Files
exercises-in-programming-style/10-things
David Foster 737aa9ef0d things: Refactor.
Specifically:
* Remove dead assignments to _data and _stop_words.
* Convert _word_freqs from class field to instance field to avoid side effects.
* Remove no-op call ''.join(self._data) because self._data is guaranteed to be a string.
2014-01-05 20:54:14 -08:00
..
2013-09-27 20:11:34 -07:00
2014-01-05 20:54:14 -08:00

Style #10

Constraints:

  • The larger problem is decomposed into 'things' that make sense for the problem domain

  • Each 'thing' is a capsule of data that exposes procedures to the rest of the world

  • Data is never accessed directly, only through these procedures

  • Capsules can reappropriate procedures defined in other capsules

Possible names: