Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Having worked with both ActiveRecord and Ecto, Ecto is consistently easier to reason about and change than AR. It feels closer to the DB without compromising composability, and better avoids surprises. Ecto is IMO one of the killer features of the Elixir ecosystem that is undercelebrated compared to the neat things that are rarely used.


Do you have any concrete examples that you're thinking of?

In particular, I found that having to include all the fields is kind of a PITA compared to AR. I also just find the mental model of an AR object to be really easy to think about in terms of the simple cases. Before save, after save, accessors, and just having methods available on the object all seem really intuitive compared to changesets. Not that I didn't figure those out in short order, they just seemed a bit clumsier. But I am not super deep into Ecto, either, so maybe I'm missing some places where it shines.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: