[erlang-questions] At what point am I "playing compiler"

Dennis Byrne dennisbyrne@REDACTED
Mon May 18 16:46:22 CEST 2009


On Mon, May 18, 2009 at 1:16 AM, Roessner, Silvester
<silvester.roessner@REDACTED> wrote:
> Hi Dennis,
>
> expressive() will always be 2 times slower than efficient
> even if the compiler could reason about lists:foldl:
> You use lists:last(List) instead of First = hd(List).

This was an oversight on my part.  Thanks for pointing this out and
thanks for giving me the heads up on hd/0, no pun intended.  The
record was also something I hadn't thought of.

> I personally find efficient() also more expressive than expressive().
> Perhaps you can use a record -record(summary, {min, man, total}) to
> increase the expressiveness.
>
> Silvester
> This message is intended for a particular addressee only and
> may contain business or company secrets. If you have received
> this email in error, please contact the sender and delete the
> message immediately. Any use of this email, including saving,
> publishing, copying, replication or forwarding of the message
> or the contents is not permitted.
>
>
-- 
Dennis Byrne



More information about the erlang-questions mailing list