Hacker News new | ask | show | jobs
by kingkilr 6049 days ago
I think that's a little unfair to people using ORMs. Obviously I'd hope people don't want to avoid knowledge, but I'll be damned if I want to write SQL, it's not fun for me. That being said I contribute to the ORM of my framework of choice, if I write the solution to my problem once I'll never have to do it again. I think it's a bit like complaining that C programs are trying to abstract away assembly. Yes they are, but as long as they have some level understanding of how machines work they'll be ok, and a hell of a lot more productive.
2 comments

Personally I don't get ORM's. May be it's because the only I have had to deal with was Hibernate, and seemed to me as an innecesary layer of complexity and bloat, and objects and relations sometimes doesn't map nicely. If you want to persist objects, use an object datastore in the first place, not a relational one.

And, what's wrong with SQL? It's simple, powerful, widely known and deployed, and cool(declarative programming, dude!).

I've read a some introductory examples about distinct ORM's and just don't get it. Where's the gain? Apart from database independence(which I don't think it's even desirable in most cases, may be Tom Kyte's books have brainwashed me irremediably), can't see one. How an ORM makes you more productive?

The people who hate SQL don't know about any of the cool stuff it can do as they've only ever used MySQL's very basic implementation.
Yes, but C maps pretty cleanly to the underlying assembly, whereas there is a very large gap between (proper, nontrivial) SQL and the typical ORM.

Perhaps "Haskell is trying to abstract away assembly" is a better comparison.