[erlang-questions] Erlang shows its slow face!

Edmond Begumisa ebegumisa@REDACTED
Tue Nov 16 16:34:28 CET 2010


On Wed, 17 Nov 2010 01:20:51 +1100, Kostis Sagonas <kostis@REDACTED>  
wrote:

> There are two basic issues here:
> (1) The Erlang compiler doesn't really handle list comprehension as
>     native loops; it compiles list comprehensions to recursive
>     functions.  lists:seq(1, N) is not special syntax -- unlike Haskell  
> --
>     and almost surely builds an actual list.
>  Yes.  This is an issue.  Actually, it's more general: in my experience  
> most Erlang programmers do not understand the difference between list  
> comprehensions and lists:foreach/2. Many of them find list comprehension  
> notation so nice that they often use it in places where building the  
> list is not only is not their intention but is completely unnecessary.
> The compiler is not sufficiently clever to perform deforestation and  
> avoid construction of intermediate lists.
>

First I'm hearing of this. It really ought to be in one of those green  
boxes in the documentation.

- Edmond -

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


More information about the erlang-questions mailing list