[erlang-questions] DRY principle and the syntax inconsistency in fun vs. vanilla functions

Daniel Goertzen dang@REDACTED
Wed May 18 18:17:43 CEST 2011


On Wed, May 18, 2011 at 11:08 AM, Michael Turner <
michael.eugene.turner@REDACTED> wrote
"I didn't ask that question until I *stumbled* on the extended syntax for
funs; I didn't know about it before. The current documentation makes it hard
to find."




I think this is a key issue here: multi-clause funs just don't happen all
that often.  It was very late in my Erlang learning experience that I found
the need for multi-clause funs, and I easily found the documentation at the
time.  I did notice the syntax inconsistency, but didn't care.   Anyway, it
is often a good idea to break funs out into full functions to reduce nesting
and facilitate tracing.  Lots of funs make programs hard to debug.

Dan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110518/c4773b82/attachment.htm>


More information about the erlang-questions mailing list