[erlang-questions] Advanced Erlang Subtleties

James Churchman <>
Fri May 20 13:35:13 CEST 2011


> Indeed.  If we can have only one built-in comparison, it needs to be
> total over all values.  It is a pity that Prolog's distinction between
> term comparison and number comparison wasn't carried over to Erlang :-(
>
> Indeed that would have made the language a tad bigger, but stopped this
ambiguity!

Are there any other  good subtleties to erlang that anybody wishes to add to
this list?
I can't have covered all of them :-)

also does anybody know the answer to my :
> There is a 3rd parameter in the AST for a catch section in a Try/Catch
that is always a match all ( a bit like ERROR_TYPE:ERROR:_ ) does anybody
know what this means? is there an extra option in a catch that is rarely
used?

James

On 20 May 2011 04:45, Jeff Schultz <> wrote:

> On Thu, May 19, 2011 at 11:02:35PM +0200, Joe Armstrong wrote:
> > > I can see the equivalent evaluation of "250"<250 being a common
> mistake,
> > > and always being false is hardly useful.
>
> > A "<" B when A and B have different types means A is
> > "less complex" than B. Lists and more complex than integers
> > "250" is a list so "250"<250 is false.
>
> > Suppose I want to make a Key-Value database, where the Key can be
> anything,
> > including 250 and "250" to make any form of ordered tree we need a total
> > order over all the keys.
>
> Indeed.  If we can have only one built-in comparison, it needs to be
> total over all values.  It is a pity that Prolog's distinction between
> term comparison and number comparison wasn't carried over to Erlang :-(
>
>
>    Jeff Schultz
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110520/d4187ad7/attachment.html>


More information about the erlang-questions mailing list