5 ms·
I couldn't help by roll my eyes at that title. ORMs and the like are great, but they still end up using SQL under the hood. LINQ is by no means the most aesthet
by fnovd 10y ago
I couldn't help by roll my eyes at that title. ORMs and the like are great, but they still end up using SQL under the hood. LINQ is by no means the most aesthetic ORM, either (and half of the article is about much better LINQ looks than SQL).
The headlines may as well read: "Why [interpreted language] beats assembly".
- __jal 10y agoSomeone seems to write one of these every few years about whatever the flavor of the month is. I recall reading one from sometime in the early 2000s about Hibernate that read the same way. And another one for one of the Perl ORMs before that. Yet somehow, dirty, ugly, hard-to-write SQL is still here while ORMs keep coming and going. And I have yet to see one without an escape hatch allowing raw SQL.
- ZenoArrow 10y ago>"And I have yet to see one without an escape hatch allowing raw SQL." I don't know where you've been looking, but from what I've seen it's an easy to find feature. To give two examples: https://docs.djangoproject.com/en/1.10/topics/db/sql/ https://docs.djangoproject.com/en/1.10/topics/db/sql/ https://github.com/StackExchange/Dapper https://github.com/StackExchange/Dapper
- __jal 10y agoUnless my reading ability is broken, we seem to be agreeing. I said I have never seen one that doesn't have one. My point being that ORMs can't fully replace SQL, and the proof is they all provide an escape hatch.
- Daishiman 10y agoThey provide an escape hatch because the language has support for features such as temporary tables, native DB functions and transaction control that are nonstandard and have a hundred gotchas, and are therefore not amenable to implement in an ORM. I have 30k lines of business logic written for Django that does not use that hatch even once.
- __jal 10y agoAgain, I see point of disagreement, other than an odd bit of defensiveness about ORMs.
- WaxProlix 10y agoLINQ isn't an ORM though, is it? At least not in the traditional sense.
- dualogy 10y agoIt's really an EDSL
- contextfree 10y agoLINQ is a set of language features and libraries that help enable better ORMs, among other things. LINQ to SQL and Entity Framework are examples of ORMs that use the LINQ features