---
title: Generation gap (pattern)
slug: generation-gap-pattern
qid: 
snapshot: enwiki-001369131768
content_hash: 
license: CC BY-SA 4.0
source: https://en.wikipedia.org/w/index.php?oldid=1369131768
tags: [20346051, 23468805, 23603337, 26220375, 27695885]
---

# Generation gap (pattern)

> [!note] Provenance
> Snapshot `enwiki-001369131768` · content root `…`
> Derived from <https://en.wikipedia.org/w/index.php?oldid=1369131768> · Licensed CC BY-SA 4.0

Generation gap is a software design pattern documented by John Vlissides that treats automatically generated code differently than code that was written by a developer. Modifications should not be made to generated code, as they would be overwritten if the code generation process was ever re-run, such as during recompilation. Vlissides proposed creating a subclass of the generated code which contains the desired modification. This might be considered an example of the template method pattern.

Generation gap is a software design pattern documented by John Vlissides that treats automatically generated code differently than code that was written by a developer. Modifications should not be made to generated code, as they would be overwritten if the code generation process was ever re-run, such as during recompilation. Vlissides proposed creating a subclass of the generated code which contains the desired modification. This might be considered an example of the template method pattern.
