rfc:horizontalreuse
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:horizontalreuse [2011/01/09 21:26] – Bump version by x.y.1 for adding note on reflection gron | rfc:horizontalreuse [2011/07/21 22:33] – Fixed typos gron | ||
---|---|---|---|
Line 519: | Line 519: | ||
Traits do not provide any provisioning for handling state. | Traits do not provide any provisioning for handling state. | ||
They are meant to provide a light-weight mechanism for flexible code reuse, | They are meant to provide a light-weight mechanism for flexible code reuse, | ||
- | with the mean goal being to avoid code duplication. | + | with the main goal being to avoid code duplication. |
- | Moreover, should not be confused with typical use cases of classes. | + | Moreover, |
When a strong coherence/ | When a strong coherence/ | ||
- | and certain | + | and invariants have to be maintained on the state, this is a good |
indication that a class is the right abstraction to implement that problem | indication that a class is the right abstraction to implement that problem | ||
with. | with. |
rfc/horizontalreuse.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1