pillaiindu

pillaiindu

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?

Most Liked

abitdodgy

abitdodgy

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.

blatyo

blatyo

Conduit Core Team

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.

Where Next?

Popular in Discussions Top

rms.mrcs
A couple of days ago I was discussing with a friend about different approaches to write microservices. He said that if he was going to w...
New
PragTob
Hey everyone, this has been brewing in my head some time and it came up again while reading Adopting Elixir. GenServers, supervisors et...
New
jer
I’ve been using umbrellas for a while, and generally started off (on greenfield projects at least) by isolating subapps based on clearly ...
New
pdgonzalez872
If this has been asked here before, please point me to where it was asked as I didn’t find it when I searched the forum. Maybe a mailing ...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 40165 209
New
marciol
Please, let me know if this kind of discussion already took place in another topic . Hi all, how do you consider if is better to build ...
New

Other popular topics Top

joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 44265 214
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

We're in Beta

About us Mission Statement