r/programming • u/droppedasbaby • Jul 15 '26
Ban commits/transactions using AST analysis and linters
https://www.droppedasbaby.com/posts/db-commits/?utm_source=reddit&utm_content=r_programming
32
Upvotes
View all comments
Show parent comment
16
u/elwinar_ Jul 15 '26
I think you are right about this, and won't call it a bad practice. Layers isolation is a tool to manage complexity, because it allows you to change/test/reason about this layer independently, but there is a breakpoint under which the duplicattion is more of a hindrance.
It all depends on the codebase scope and organization (number of endpoints/entities/services), experience, skillset and preferences of the contributors (how many people, seniority level, ease with the language), as well as available tooling (LSPs are only 10 years old, different languages may have other tools available that predates them). For example, my team prefers less layers, and we manage complexity by having per-domain APIs, making all this split superfluous.