On 08/05/2011, at 04:58, Kyle Simpson wrote: > > (...) So I felt like it was important to voice "early" that not everyone > feels universally so lovey-dovey over that syntax. (..)
What happened to "Allen's lambda syntax proposal" ? When, why was it ditched in favor of -> ? Brendan, you liked it. What has happened ? <https://mail.mozilla.org/pipermail/es-discuss/2008-November/008216.html> -- Jorge. Begin forwarded message: > From: Brendan Eich <[email protected]> > Date: 30 de noviembre de 2008 07:30:14 GMT+01:00 > To: [email protected] > Subject: Allen's lambda syntax proposal > > At the TC39 meeting two weeks ago in Kona, we had a brief bikeshedding > discussion about lambda syntax and why it matters. Observation: blocks in > Smalltalk being lightweight means users don't mind writing them for control > abstractions, compared to JS functions in ES3. In Smalltalk, ignoring JS, > it's hard to beat [ and ] as overhead, although one must count the message > selector and its punctuation too. > > Allen Wirfs-Brock put his proposal, which will not shock you who know > Smalltalk or Allen, on the whiteboard: > > // Instead of lambda (a, b, c) { ... }, why not: > { |a, b, c| ... } ? > > I then started to write an example of return to label, and in need of a > nested lambda, got stuck for a split second trying to write > function^H^H^H^H^H^H^H^lambda. After thinking 0.3 more seconds I then said "I > will use Allen's proposed syntax". Pure win, readers and the writer (me) > agreed. > > I think someone proposed pretty much the same syntax here on es*-discuss > within the last two years, but I can't find that message at the moment. > > Bikeshed color is secondary to semantics, but lambda conciseness does matter. > I think Allen's homage to Smalltalk in JS wins. Every time I reach for more > verbose syntax my hand steers back to those || delimiters. > > Am I an old Smalltalk fan? Sure, I have Byte magazine with the balloons on > the cover still (in a box somewhere; mildewed, sadly). I'm the C hacker who > took the "make it look like Java" orders and made it look like C with some > awk, Self, Scheme, and even HyperCard (HyperTalk, actually) influences. > > Eclecticism is not an end, but it could be a means to a better end than a > cramped non-eclectic grammar, if the deeper reasons for concise lambda syntax > are sound and valid. Syntax is for users, it must be usably sweet. It's not > all about theoretical completeness and minimality. > > Anyway, we need a fun weekend thread, and everyone loves syntax. Comments? > Huzzahs? The latter go to Allen. Go nuts. > > /be _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

