Why Erlang is the best concurrent language available

Daniel Dudley daniel.dudley@REDACTED
Fri Jan 24 16:40:42 CET 2003


I'm aware that tail-recursion can be implemented (behind-
the-scenes) as iteration, Matthias, and thus reduce stack
usage. But without use of reference variables the need to
specifically reverse the list still remains.

Cheers,
Daniel

----- Original Message -----
From: "Matthias Lang" <matthias@REDACTED>
To: "Daniel Dudley" <daniel.dudley@REDACTED>
Cc: <erlang-questions@REDACTED>
Sent: Friday, January 24, 2003 11:02 AM
Subject: Re: Why Erlang is the best concurrent language available

>  > > "I build up this list backward, then I reverse it at the
>  > > end, creating an entirely new copy of the list," then it
>  > > *sounds* pretty appalling.
>
>  > Well, it is appalling. Knowing that recursion "winds up"
>  > before it "winds down", why do it twice when once will
>  > suffice?
>
> Because tail recursion allows you to avoid the winding altogether.
>
> Avoiding the winding is useful because (a) it may help you avoid
> running out of memory and (b) it may be faster. See also:
>
>   http://www.erlang.org/doc/r8b/doc/efficiency_guide/functions.html
>
> and
>
>
http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-34.html#%_sec_5.4
.2
>
> Matthias




More information about the erlang-questions mailing list