[erlang-questions] learning Erlang: factoring primes

Dominic Williams xpdoka@REDACTED
Fri May 4 13:42:32 CEST 2007


Hello Anthony,

>> Learn to use =:= instead.  It's more kosher.
>> [...]
>> But is it not an issue of performance; it's a problem in the
>> semantics of the == operator.
>
> Please elaborate. The erlang manual is terse. For integer
> arguments I can see no difference in semantics between the two.

The manual is actually quite explicit on the subject.

== performs implicit casts, unlike =:= and =/=.

In particular:

1> 1.0 == 1.
true
2> 1.0 =:= 1.
false

Regards,

Dominic Williams
http://www.dominicwilliams.net

----




More information about the erlang-questions mailing list