Why Erlang is the best concurrent language available

Matthias Lang <>
Fri Jan 24 11:02:14 CET 2003


 > > "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