3 ms·
I pretty much agree with this. As much as I liked the core language, I absolutely hated using anything else in the ecosystem, and in my opinion a lot of that wa
by zinclozenge 3y ago
I pretty much agree with this. As much as I liked the core language, I absolutely hated using anything else in the ecosystem, and in my opinion a lot of that was due to lack of static types. Using Ecto as the main way of interacting with the database was a miserable experience. Part of that was due to skill issue I'm sure.
- parthdesai 3y ago> Using Ecto as the main way of interacting with the database was a miserable experience. Ecto is prolly one of the best ways to interact with db. Genuinely curious, what other ORMs have you used?
- zinclozenge 3y agoI usually just write the SQL, honestly. For the last 6ish years of my career I've mainly been in the Golang world, so the closest I've gotten to an ORM is a utility to scan rows into structs.
- freedomben 3y agoInteresting, I usually just write the SQL too in most projects, but in Elixir I love Ecto because it's so close to the SQL but has an elegant and powerful way to handle interpolated values.
- Andys 3y agoHave you tried sqlc? Different to any other SQL library I've used and suits Go really well
- zinclozenge 3y agoYes, I like it very much. I've run into some edge cases with it, and I wish there was a setting to change the names of some of the autogenerated code, but otherwise it works very well.
- Andys 3y agoYeah, hopefully its plugin architecture will continue to develop and make changing things easier in the future.
- sergiotapia 3y agoOn the flipside for me Ecto is the perfect balance between ORM and writing raw SQL queries. I've used many different ORMs like Entity Framework, ActiveRecord, Prisma, Ecto - Ecto stands alone.
- throwawaymaths 3y agoI believe... technically Ecto is not an ORM but a query builder, which may be why you like it better than an ORM.
- kerkeslager 3y ago> As much as I liked the core language, I absolutely hated using anything else in the ecosystem, and in my opinion a lot of that was due to lack of static types. You might be interested in Gleam[1]. [1] https://gleam.run/ https://gleam.run/
- malkosta 3y ago> Ecto as the main way of interacting with the database was a miserable experience That's very common when you don't know DBs. But DB savy developers usually claim the opposite, because the syntax is more familiar.
- zinclozenge 3y ago> That's very common when you don't know DBs. I'm not a 20 year DBA greybeard veteran, but I'm comfortable enough to write schemas and queries by hand without any issue, and the entire time I wished I could do just that instead of using Ecto.
- sph 3y agoNo one stops you from writing raw SQL with Ecto. But good luck creating composable SQL with raw string interpolation, which Ecto excels at.
- zinclozenge 3y agoPR reviewers stopped me from writing raw SQL.
- malkosta 3y agoEcto queries are much closer to DB queries, when you use the macro syntax. But if you come from an ORM perspective and expect the same experience on Ecto, yes I agree it won't please you.