[erlang-questions] Closure on named function as values

Jakob Praher jakob@REDACTED
Sun Feb 5 18:49:04 CET 2012


Dear Erlangers,

this is a closure on my posts on function references. First of all I
think Erlang is an amazing language and I am happy to be studying it in
more detail. I really enjoy writing Erlang code.

I find it funny that in retrospect the discussion seems to confirm
Wadler's law of language design[1]: people tend to spend 8-times the
amount of the time used for discussing semantics on discussing the
lexical syntax of comments :-)

To my defense I was not so much interested in the concrete syntax but in
the fact that I found it  unintuitive how to pass a named function as a
value. I was thinking more about the operational aspects. Applying a
function consists of evaluating the body of the matching function
clause. In this procedure the arity to me is just as important as any
other aspect of the argument values passed. For instance map/2 in [2]
still refers to two possible function clause bodies.

This said I am happy, if you can point me to some good papers or source
code spots about the implementation of erl/beam. I will definitely dig
more into the Core Erlang spec [3].

Happy hacking,
Jakob

[1] - http://www.haskell.org/haskellwiki/Wadlers_Law
[2] - http://www.erlang.org/doc/programming_examples/funs.html
[3] - http://www.it.uu.se/research/group/hipe/cerl/


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120205/4a1b4242/attachment.htm>


More information about the erlang-questions mailing list