News for hackers. Stuff that matters.
Re:Two years of Elixir at The Outline by BenMorganIO on Friday October 26, 2018 @04:01PM (#18312315)
Often times when writing a macro or a function that should appear as though it's a part of a DSL, the advantage of turning off parenthesis can shine here. That's why parenthesis are optional with a lot of the Ecto macros.
Re:Two years of Elixir at The Outline by mercer on Sunday October 28, 2018 @06:04AM (#18319933)
Optional parentheses are pretty much a requirement considering how much of Elixir is actually 'just' macros. I'm very happy that the formatter adds them for me as much as possible though, because I'm also not a fan of how far Ruby takes it.
Re:Two years of Elixir at The Outline by BenMorganIO on Sunday November 04, 2018 @10:25AM (#18376246)
Agreed. I used to remove parenthesis as often as possible. Looking back at the code, that may not have been the brightest idea.

I really do like the coding convention though that lack of parenthesis can indicate a function meant to be a part of a DSL.

Re:Two years of Elixir at The Outline by pdimitar on Saturday October 27, 2018 @02:15AM (#18314578)
I agree. As an additional point, when you have auto-formatting on save, this can also enrich your insight about the DSL at hand. It has for me.