The very best ORMs are not anywhere near as good at 'compiling' their abstractions into platform-specific SQL than your standard C/C++ compiler is at producing optimized platform-specific machine code. Part of the reason for this is that SQL is already at a high level of abstraction comparable to the ORMs themselves; the relationship between Python and SQL is not comparable to the relationship between Python and assembly (or C and assembly, etc.)
A better analogy than the language one: Your web app has to run on Firefox, Chrome, and... IE6 yay! You're not allowed to use any modern Javascript, or most of the API's you'd like to use.
Because being able to switch to IE6 at any point in development is more useful than any of those fancy-dancy API's, right?
If there was an ORM that dealt with everything but a flaky end of life database, sure start working on it.
But this is advocating picking one platform. Like creating Chrome-only JavaScript. I guess the nearest thing with Electron.
Yeah the analogies breakdown at some point.
I don't think anything is black-and-white. I just think the vast majority of Django apps are fine with Django's ORM. This article smacked of premature optimisation.
> I always get the feeling that people love ORMs because they don't want to learn SQL.
I suspect that's the problem. It's neither my feeling or my experience.
Every platform/language/OS/chip I know has annoyingly apparent problems. In my experience high-self-conidence-low-self-awareness folks are too keen to drop-level and 'make it right'. And love feeling how smart they are ('everyone who disagrees is obviously not as smart!) Too often 'smart-guys' cost more, long term. And I'm not ragging on you. That was me in my 20s. Embarrassingly.
Agree, at least for me, I don't discovered the sqlsuperpowers till I got inside it...
I would love to see some of this pretty clever orm migrations applied on a busy potgresql server.. with a bit of concurrency... :)
imagine hating working with databases so much you'd want to spin not being able to use modern databases amazing features as a "potential positive" just so you don't have to deal with them...
"Imagine hating databases" ... "just so you don't have to deal with them"
Do you normally respond to issues by trying to characterise people?
Imagine this fictional world where anyone that disagrees with me is incompetent.
In my experience, I think working with database specific functionality is like dropping to lower-level of code generally. Something I have done in ORM->Raw SQL and C->Assembly. There is a point where the price in development cost, testing development time, platform lock-in, reduced code reuse IP, subset of experienced programmers within the team/salaries/training, loss of access to future updates and bug fixes, and so on is worth it. But almost never in my experience. Almost but not entirely.
Isn't that a potential positive?
I mean, yeah, and those darn programmers with their 'platform independent languages'. Why are you not using the power of assembly?