3 ms·
For me, no data is either NaN or zero, but +infinity is was the astounding part. Also, for some languages, not failing with an exception when comparing differe
by a3w 4y ago
For me, no data is either NaN or zero, but +infinity is was the astounding part.
Also, for some languages, not failing with an exception when comparing different strong types, could be a source of bugs, generally.
- throwawaymaths 4y agoIn Elixir, nil is an atom (a global enum namespace), it's not a special data type that has meaning outside of a convention (heavily supported by the stdlib) that "you should use it to mean nothing"[0]. To hammer this home, nil is meaningless and not generally understood by that convention in Erlang (which often returns undefined). Elixir/BEAM is strongly typed. There is no coercion going on when you are doing comparisons. [0] note that in elixir, "if" is in the stdlib, it's sugar over case, and the falsiness of nil is software-level (only false and nil are falsy in elixir, which is sane).