On Fri, Sep 14, 2018 at 09:30:51PM +0200, Elizabeth Mattijsen wrote:
: The combination of “->” and “{ }” is sometimes referred to as a “pointy 
block”, or even maybe just a “pointy”.

Note that "pointy" is specifically referring to the syntax here, not the
semantics.  People use other terms when they want to talk about semantics.

Sometimes when people are talking about functional programming, they'll
call this a "lambda" because that's what anonymous functions are
often called in FP.  Because Lisp, originally....

That's a completely arbitrary name that is relatively non-descriptive.
(Which could be said for most of the uses of greek letters in academia...)

So for something more descriptive, lambdas will often be called
"closures" when you're referring to the way they capture ("close over",
to a mathematician) a snapshot of external variables.

Though "lambda" also implies this to someone who speaks the Functional
Programming lingo.  So if you meet an FP person and want to sound smart,
just tell them:

    "-> is how we spell λ in Perl 6"

Larry

Reply via email to