Hacker News new | ask | show | jobs
by minism 1493 days ago
I see where you're coming from, but tbh the more I work on web backend code the more I disagree with this. I really think database interactions should be made explicit, even early on, rather than hidden by ORMs (or overriding a dot operator).
1 comments

That's fine, but you are making a trade off with productivity here.
You have to be careful because sometimes productivity is just an illusion caused by accruing technical debt that you have to then pay for in time later. With database abstractions you often pay back this debt once the app reaches even slight complexity and you need to spend a lot of time understanding, debugging and refactoring query flows.
Writing backend with raw SQL: $10

Writing backend with a rigid, verbose, mostly type-safe ORM: $5

Writing backend with a terse, expressive ORM: $2.50

Adding type annotations to the previous code: $1