What is the idiomatic way of matching for not nil in Elixir?
E.g.,
First way:
defp halt_if_not_signed_in(conn, signed_in_account) when signed_in_account != nil do
Second way:
defp halt_if_not_signed_in(conn, signed_in_account) when not is_nil(signed_in_account) do
If there is a preferred way does anybody know the reason?
Personally I prefer the first way because it reads more naturally and takes less horizontal space but examples I’ve seen have used not is_nil(...) and I am wondering why.






















