Reply-Function for LiveViews

I’ve been working on a project for a while that was first built by a lot of Elixir “newbies” sort of speak (at least that’s what I heard) and this is one of the first things that immediately caught my attention when I started browsing some of the project’s LiveViews.

I think this is mainly because a lot of people who first learn Elixir get mesmerized by how beautiful pipelines are and try to shoehorn everything in there (yeah, it’s cool I know, been there done that). But sometimes I find that this obsession tends to create an extra cost of overly abstracting things at the expense of readability.

Also, I want to echo what @derek-zhou said:

I’m not against abstraction, but poor abstractions create a level of indirection that makes things harder to follow, so keep that in mind.

3 Likes