Block lambda is cool, its syntax isn't

john saylor js0000 at gmail.com
Fri Jan 13 13:11:24 PST 2012


On 01/13/2012 03:36 PM, Rick Waldron wrote:
> As
> others on the list have said previously and is now very clear to me,
> pipes provide a very distinct visual cue "this is a block lambda, expect
> X to happen here" where the {(args) expr } gets lost; these visual cues
> are important when you're reading and writing "real world" programs in
> JavaScript.

yes, i had the same impression [thx to those who supplied code examples].

one problem i came across in this domain is that a block lambda with no 
arguments is visually identical to a boolean or ['||']. context, i 
believe, will clarify this; but from a purely visual perspective, two 
adjacent pipe characters are almost archetypal for the boolean or 
operator [if i can speak about archetypes in computer programming].

-- 
http://or8.net/~johns "yeah yeah yeah" -beatles


More information about the es-discuss mailing list