News for hackers. Stuff that matters.
Re:What ORMs have taught me: just learn SQL (2014) by scarface74 on Monday December 18, 2017 @07:45AM (#15951238)
How often is the ORM generating junk? To say that the ORM is useless because occasionally it doesn't generate performing code (with EF and Linq more often than not it does generate performant code) could be applied to any high level construct. But I don't see people giving up modern languages to go back to writing everything in Assembly or even C.

Yes I optimize when my automated performance testing/stress testing, tells me I need to and may write handcrafted sql, but I've also handcrafted some classes in C back in the day when my old Windows Mobile app using the C# compact framework wasn't performing.

Re:What ORMs have taught me: just learn SQL (2014) by zimpenfish on Monday December 18, 2017 @08:28AM (#15951432)
> How often is the ORM generating junk?

From what I've seen (couple of home-grown ones, Class::DBI, ActiveRecord), "more often than you want".

(I'm willing to admit they may not be class-beating examples. :)

Re:What ORMs have taught me: just learn SQL (2014) by scarface74 on Monday December 18, 2017 @08:53AM (#15951572)
I meant a good ORM. But then again, my definition of a good ORM is an ORM with a language that treats queries as a first class citizen. EF with Linq doesn't really act feel like a separate framework since Linq and Expressions are built into the language.
Re:What ORMs have taught me: just learn SQL (2014) by zaphar on Monday December 18, 2017 @09:11AM (#15951672)
Those are more of a query framework than an ORM. If that's your bar then most ORMs are going to fail to meet it.
Re:What ORMs have taught me: just learn SQL (2014) by scarface74 on Monday December 18, 2017 @09:49AM (#15951944)
How is it a "query framework"? Linq works with objects and the Linq expression provider treats the Linq as data that translates the objects to Sql at runtime. That is by definition an Object Relational Mapping.

Of course most ORMs do fall short because most languages don't have the powerful concept of "code as data".