[erlang-questions] handle_info stopped crashing if no match?

Mikael Pettersson mikpelinux@REDACTED
Sun Feb 25 11:38:38 CET 2018


On Sun, Feb 25, 2018 at 1:01 AM, Max Lapshin <max.lapshin@REDACTED> wrote:
> Btw,   https://github.com/erlang/otp/pull/1346#discussion_r101742522
>
> "
>
> bjorng on Feb 17, 2017
>
> Contributor
>
> Use =:= instead of ==."
>
>
>
> Why using =:= is better?

=:= is exact equality as used in pattern-matching, == is "value
equality" where in addition integers compare equal to same-valued
floats.

Generally use the exact operations =:= and =/= unless you're certain
you want the variants with implicit numerical conversions.  There's
also a slight performance benefit to the exact operations.



More information about the erlang-questions mailing list