Hauleth @hauleth.dev · Mar 25

The fact that #ElixirLang always required `:do` keyword for single line function definitions was IMHO weird. I get it that the idea was to not have N different ways to do the same, but honestly, I think that supporting `def foo(a, b) = a + b` would make code easier to read

5 likes 2 replies

?

Replies

LostKobrakai · Mar 25

Given this is a keyword list under the hood this always made sense to me. The multi line for is actually the syntax sugar version. An `=` also doesn't support multiple block values in single line form, like `if a == b, do: :a, else: :b`