3 ms·
Hot take: ORM is dynamic runtime code gen. Sometimes, you need dynamic code gen and you dont want to manually do it. …but mostly, it’s a bad idea. You can’t e
by wokwokwok 3y ago
Hot take: ORM is dynamic runtime code gen.
Sometimes, you need dynamic code gen and you dont want to manually do it.
…but mostly, it’s a bad idea. You can’t easily debug the generated code, you can’t easily tweak the behaviour, and writing the templates for it is hard.
Mostly you can replace it with a hand written or pre generated (“compiles to sql”) solution… but I’d like to point out you can’t always and if you do need dynamic SQL please, use an ORM, don’t template your own half baked solution.