Skip to content

Conversation

@Tinche
Copy link
Member

@Tinche Tinche commented Jan 22, 2026

No description provided.

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 22, 2026

Merging this PR will not alter performance

✅ 54 untouched benchmarks


Comparing tin/overrides-in-annotated (6e71cab) with main (309e9d1)

Open in CodSpeed

@Tinche Tinche force-pushed the tin/overrides-in-annotated branch from 85bd2e8 to ad643c7 Compare January 23, 2026 22:28
@Tinche Tinche requested a review from hynek January 26, 2026 18:25
One of the fundamental [design decisions](why.md#design-decisions) of _cattrs_ is that serialization rules should be separate from the models themselves;
by using this feature you're going against the spirit of this design decision.

However, software is written in many different context and with different constraints; and practicality (sometimes) beats purity.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
However, software is written in many different context and with different constraints; and practicality (sometimes) beats purity.
However, software is written in many different context and with different constraints; and practicality _sometimes_ beats purity.
_Sometimes_, it's not worth introducing a mapping layer to rename one field.
_Sometimes_, you're busy prototyping and will clean up your code later.
The danger is not any single compromise, but their accumulation.
One of the most important skills as a software engineer is knowing when the cost of a trade-off has crossed the line and it's time to do things properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants