small medium large xlarge

22 Nov 2013, 14:11
Jim McCoy (1 post)

So far I am enjoying the book and have been giving it a re-read as each new major Elixir rev leads to an update. One area that I think was not explained very well is the when and why of & notation (specifically when &SomeFunction/arity would be used as an arg.) A recent sequence of posts on the elixir-core mailing list brought the issue back up again and a recent post by Jose (“Lisp 1 vs Lisp 2”) contained a very succinct explanation for why this notation exists and why you would use it in certain cases, specifically the differences between variable and function namespaces. In general I think a better dive into & notation and the . for calling functions help improve clarity and eliminate some confusion that can arise in later code samples.

You must be logged in to comment