Block lambda is cool, its syntax isn't

Rick Waldron waldron.rick at gmail.com
Fri Jan 13 12:36:48 PST 2012


FWIW, After working through the example gists that I created last night, my
opinion changed about the look of Block Lambda's with pipes. 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.


Rick







On Fri, Jan 13, 2012 at 1:51 PM, Allen Wirfs-Brock <allen at wirfs-brock.com>wrote:

>
> On Jan 13, 2012, at 6:09 AM, john saylor wrote:
>
> hello world!
>
> On 01/12/2012 09:09 PM, David Herman wrote:
>
> It does help to write a reasonable chunk of code to compare syntaxes for
> uses of a feature "in the wild." Does some enterprising es-discusser wanna
> take a big JS program with a bunch of little anonymous functions, swap them
> out with block lambdas, and make two gists with the two different syntaxes?
> That'd be super helpful.
>
>
> i think this would be very helpful too [although, sadly, since i am
> overcommitted as it is, it will not be me].
>
>
> I've updated a version of my ES.next Smalltalk collections implementation
> experiment to use block lambdas.
> This version is
> https://github.com/allenwb/ESnext-experiments/blob/master/ST80collections-exp0-blp.js
>
> The one that you should compare it to is
> https://github.com/allenwb/ESnext-experiments/blob/master/ST80collections-exp0.js
>
>
> As you might expect, this new version is even closer in form to the
> original Smalltalk code.
> In particularly, I was able to eliminate all the artifacts that needed to
> be introduced because of function expressions  don't have Tennent's
> Correspondence.
> In the source, I've tagged the lines where TCP is using /*TCP*/
>
> Allen
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120113/8de74b4c/attachment.html>


More information about the es-discuss mailing list