Replace Type Code with Subclasses¶
Fowler, M. (2019). Replace Type Code with Subclasses. Refactoring: Improving the Design of Existing Code.
Cited by¶
1 citation across 1 artifact.
Each citation links to the sentence it supports in the citing article.
Primes¶
- Type–Token Distinction
- When lower-level variation stops being noise and starts being systematic — when some subset of occurrences reliably behaves differently from the rest — the correct response is not to widen the form's tolerance until the outliers fit, but to introduce a level: split the form, or promote the recurring variation into a form of its own with the original standing above it.
This sourcePrescribes introducing a subclass level when a code marks a subset of instances that behaves differently, rather than absorbing the variation inside the original class; listed with the earlier name Extract Subclass as an alias.
- When lower-level variation stops being noise and starts being systematic — when some subset of occurrences reliably behaves differently from the rest — the correct response is not to widen the form's tolerance until the outliers fit, but to introduce a level: split the form, or promote the recurring variation into a form of its own with the original standing above it.
Verification¶
Does it exist? Not checked yet. This entry carries no identifier to resolve. It was extracted from the citation as written in the article, normalized, and deduplicated against the rest of the registry.
Does it back the claim? Not recorded. The single citation of this work carries no recorded support check.
Support is checked per citation rather than per work — the same source can be cited soundly in one article and wrongly in another. Per-citation recording began recently, so a citation with no recorded check is a gap in the record rather than evidence it went unchecked.
See how references were verified.
Registry ID ref:5800cc303ff9 · see in the full table