News for hackers. Stuff that matters.
Re:Is ORM still an anti-pattern? by kstrauser on Tuesday June 27, 2023 @04:39PM (#36498338)
That's begging the question: it never was.

Some ORMs are awful to work with, but that doesn't mean the genre is a bad idea. I've loved working with SQLAlchemy over the years because it doesn't try to re-invent the whole idea of SQL. Instead, it gives you a convenient layer for building queries, passing them around, etc., while it concentrates on getting the details right so you don't have to futz around with them.

Re:Is ORM still an anti-pattern? by evrimoztamur on Tuesday June 27, 2023 @04:51PM (#36498454)
I also can vouch for SQLAlchemy, in the in the sense that it allows me to write SQL with confidence, where the code matches the query.
Re:Is ORM still an anti-pattern? by bellgrove on Tuesday June 27, 2023 @04:53PM (#36498479)
I haven’t seen someone use the phrase begging the question properly in… forever.
Re:Is ORM still an anti-pattern? by jkrubin on Tuesday June 27, 2023 @09:07PM (#36500974)
What is the proper usage?
Re:Is ORM still an anti-pattern? by teddyh on Tuesday June 27, 2023 @09:41PM (#36501233)
Re:Is ORM still an anti-pattern? by kstrauser on Tuesday June 27, 2023 @09:14PM (#36501038)
I don't think I can summarize it concisely, so I'll defer to the wiki: https://en.wikipedia.org/wiki/Begging_the_question

In this case, the phrasing of the question implies something not at all evident, that ORMs are an anti-pattern.

Re:Is ORM still an anti-pattern? by nprateem on Wednesday June 28, 2023 @02:16AM (#36502952)
Including here, since 'it never was' is a statement, not a question. So no question has been begged.
Re:Is ORM still an anti-pattern? by DangitBobby on Wednesday June 28, 2023 @02:31AM (#36503077)
You've misunderstood the comment. The question posed in the title of TFA is being begged.
Re:Is ORM still an anti-pattern? by nprateem on Wednesday June 28, 2023 @04:11AM (#36503723)
Oh I see, 2 statements:

That's begging the question. It never was.

Re:Is ORM still an anti-pattern? by tempest_ on Tuesday June 27, 2023 @10:09PM (#36501454)
My only real ORM experience is with SQLAlchemy (and a tiny bit of trying to learn ecto) and based on this thread I have to ask are all the other ORMs just terrible?

I've been learning some rust lately and writing out boilerplate code to handle simple CRUD is painstaking and it feels like a waste of my time.

SQLAlechemy's ORM can get in the way a bit for more complex queries (or ones you are trying to optimize) but you can always just drop down and write the SQL for those specifically.

Re:Is ORM still an anti-pattern? by edgyquant on Tuesday June 27, 2023 @10:55PM (#36501710)
>are all the other ORMs just terrible

From what I’ve seen yes. My first ORM was flask-sqlalchemy. Migrating a database was literally just updating an object and running a command. No other ORM has been this seamless.