4 ms·
This looks pretty elegant, but it's a shame that Elixir uses the Ruby-style multi-line code blocks with do end. Looking at those code examples, 'end' take up ar
by insertion 12y ago
This looks pretty elegant, but it's a shame that Elixir uses the Ruby-style multi-line code blocks with do end. Looking at those code examples, 'end' take up around 25% of the lines with code. Does anyone know if they considered taking the Python approach? Would be curious to hear the arguments behind the decision. I've noticed that most people seem to favor the Python approach after trying it, but that it's rarely used in new languages.
- codexon 12y agoI absolutely agree with this. Having end clutters up the screen. Many people dislike python whitespace though but I think brackets are still better than end.
- adamkittelson 12y agoHere's a link to a discussion on the mailing list that touches on why Python-style significant whitespace wasn't used: https://groups.google.com/forum/#!topic/elixir-lang-talk/u6PXqsfX1HQ https://groups.google.com/forum/#!topic/elixir-lang-talk/u6P...