[erlang-questions] Funargs: Ruby-like blocks for Erlang

Tony Arcieri tony.arcieri@REDACTED
Fri Jul 22 01:34:35 CEST 2011


On Thu, Jul 21, 2011 at 3:48 PM, Richard O'Keefe <ok@REDACTED> wrote:

> > However, I'd rather ask: can Erlang have something like Ruby like
> > blocks? Yes, yes it can.
>
> Well yes, it does.  They are called funs.


This sort of sentiment lacks any sense of aesthetics. It is akin to saying
that a potato sack is the same thing as a suit coat because both provide the
same basic function of covering your torso.

Let me call out explicitly what is ugly about Erlang fun syntax: it combines
a symbolic token "->" with a keyword token "end" instead of a matching pair
of symbolic tokens (e.g. "{" ... "}" or even "->" ... ".") or a matching
pair of keywords (e.g. "do" ... "end").

I think there are a lot of people in the Erlang community who are either
completely oblivious to how that sort of thing harms the aesthetics of the
language or willfully choose to ignore it. This makes the Erlang "fun"
syntax awkward and clumsy and not particularly "fun", when really anonymous
functions are a powerful concept and should be a pleasure to use.

-- 
Tony Arcieri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110721/4ddfb54d/attachment.htm>


More information about the erlang-questions mailing list