Block lambda is cool, its syntax isn't

Allen Wirfs-Brock allen at wirfs-brock.com
Fri Jan 13 10:51:37 PST 2012


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120113/6043a83b/attachment.html>


More information about the es-discuss mailing list