Do you always add a trailing comma?

The main problem in Elixir is that trailing comma isn’t always possible, ex.:

def foo(a, b), do: {a, b}

# Legal
foo(10,
    20
)

# Legal
foo(10,
    a: 20
)

# Legal
foo(10
    a: 20,
)

# Illegal
# foo(10,
#     20,
# )
6 Likes