Re: Different semantics should have different-looking syntax

2011-06-04 Thread Peter Michaux
On Sat, May 21, 2011 at 12:37 PM, Brendan Eich bren...@mozilla.com wrote: For http://wiki.ecmascript.org/doku.php?id=strawman:block_lambda_revival I have written up the Ruby-inspired {|x| x * x} syntax. Alternatives (ignoring keyword issues) that look more like function syntax (Peter's

Re: Different semantics should have different-looking syntax

2011-06-04 Thread Brendan Eich
On Jun 4, 2011, at 7:24 PM, Peter Michaux wrote: On Sat, May 21, 2011 at 12:37 PM, Brendan Eich bren...@mozilla.com wrote: For http://wiki.ecmascript.org/doku.php?id=strawman:block_lambda_revival I have written up the Ruby-inspired {|x| x * x} syntax. Alternatives (ignoring keyword issues)

Re: Different semantics should have different-looking syntax

2011-05-22 Thread Brendan Eich
On May 21, 2011, at 9:57 PM, Bob Nystrom wrote: On Sat, May 21, 2011 at 1:24 PM, Brendan Eich bren...@mozilla.com wrote: It turns out now that it's really a dilemma what to choose -- arrows or blocks... have to think. Arrow function syntax is just syntax. I will drop it if we can agree

Different semantics should have different-looking syntax

2011-05-21 Thread Brendan Eich
For http://wiki.ecmascript.org/doku.php?id=strawman:block_lambda_revival I have written up the Ruby-inspired {|x| x * x} syntax. Alternatives (ignoring keyword issues) that look more like function syntax (Peter's suggestion of lambda (x) { x * x }, e.g.) seem worse in this light: block lambdas

Re: Different semantics should have different-looking syntax

2011-05-21 Thread Brendan Eich
On May 21, 2011, at 12:37 PM, Brendan Eich wrote: For http://wiki.ecmascript.org/doku.php?id=strawman:block_lambda_revival I have written up the Ruby-inspired {|x| x * x} syntax. Alternatives (ignoring keyword issues) that look more like function syntax (Peter's suggestion of lambda (x) {

Re: Different semantics should have different-looking syntax

2011-05-21 Thread Bob Nystrom
On Sat, May 21, 2011 at 1:24 PM, Brendan Eich bren...@mozilla.com wrote: It turns out now that it's really a dilemma what to choose -- arrows or blocks... have to think. Arrow function syntax is just syntax. I will drop it if we can agree on block lambda revival. As @_sjs (Sami Samhuri)