Embedded Elixir (EEX) with endif, endfor etc

Just a random thought came to mind, and I wanted to share with you people and see if others also think so or not.
I think if embedded elixir had endfor, endif etc, it could be more readable. What do you people think?

Perhaps, but then it wouldn’t be embedded elixir. You could label it yourself though: <% end %><%# if %>. Usually indentation is the thing that helps distinguish though.


I didn’t test this, but wouldn’t <% end # if %> also work? Anyway, I’m not really sure that adding endif and so on would really be all that helpful. I feel that when you have so many <% end %>s that your code becomes hard to follow, the issue may be the code itself. It’s sounds like a code smell.