Read the whole thread. As I noted earlier today, Maciej pointed out the infelicity of a new control effect system (return, break and continue in lambda affecting the outer function, and throwing if the outer function has returned already). Waldemar observed that it is hard to beat function, except for the syntactic burden. You end up introducing something too like function to be worth it, or too strange and confusingly different in JS's statements-for-control-effects non-functionally-pure world.
/be On May 8, 2011, at 2:39 AM, Jorge wrote: > 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 <bren...@mozilla.com> >> Date: 30 de noviembre de 2008 07:30:14 GMT+01:00 >> To: es-discuss@mozilla.org >> 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 es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss