Hacker News
Be Intentional About How AI Changes Your Codebase: Semantic vs. Pragmatic Function Architecture
Ben Swerdlow's framework (120pts, 49 comments on HN) separates code into 'semantic functions' — pure, minimal, no side effects, highly unit-testable — and 'pragmatic functions' that wrap them for real-world workflows, expected to change completely over time. The central claim: 'The only thing that sloppifies a codebase faster than 1 coding agent is a swarm of them.' Identified degradation patterns include semantic functions silently accumulating side effects, data models accumulating optional fields until incoherent, and function names diverging from behavior — all accelerated by AI code generation.
↳ Follow the thread