【翻訳】なぜ、Eloquentは悪いのですか?
前にreddit/laravelのサブレを見てたら、こんな内容が投稿されていた
I interviewed with a company about a year ago out of boredom and they were using Laravel for their web store app
We got to talking about Eloquent and they seem to have a raging hatred for it, though they wouldn’t elaborate on why it is so bad.
They may have been using an older version, I’m not sure.
Is there any reason why one would look at Eloquent and say “keep that shit away from my app?”?
私は約1年前に会社にインタビューしました。そして彼らはwebのstoreアプリにLaravelを使っていました。
私達はEloquentについて話すようになり、そして彼らはEloquentに対して猛烈な憎しみを持っているようでしたが、なぜ悪いのかを詳しく述べてくれませんでした。
彼らは古いバージョンを使用していたのかもしれませんがよくわかりません。
Eloquentを見て「そんなクソッたれなものを近づけるなよ」と言う理由があるのでしょうか?
という書き込みがあった。これに対する一番票を獲得していたのが以下の答えでした。
I don't think there should be a default disdain for Eloquent/ORM unless you've graduated to a place in your app where you are better off writing your own queries.
Most queries are entirely fine with Eloquent. I don't get why someone would always trade code that's quicker to write, and easier for other developers to read (e.g., Eloquent), in lieu of wanting to write pure SQL.
When you write an application, a large scale one, and I do work on one, and we use Laravel/Lumen in some places--my gut instinct isn't to cut away Eloquent. If we notice there is an opportunity optimization that is needed, due to Eloquent, we will do it. Otherwise it's pre-mature and a waste of time.