4 ms·
Can anyone fill me in what the meaning of == vs =:= in Erlang is? Since after the change +0. == -0. but not +0. =:= -0.
by yccs27 3y ago
Can anyone fill me in what the meaning of == vs =:= in Erlang is? Since after the change +0. == -0. but not +0. =:= -0.
- ollien 3y ago=:= is supposed to be "exactly equals". An example given in the docs[1]: 1> 1==1.0. true 2> 1=:=1.0. false You can think of it as analogous to == vs === in JS, except that the "type safety" here really only refers to different numeric types (and in JS there is no such distinction) [1]: https://www.erlang.org/doc/reference_manual/expressions.html#term-comparisons https://www.erlang.org/doc/reference_manual/expressions.html...