Re: Automatic Semicolon Insertion: value vs cost; predictabilityandcontrol; alternatives

2011-04-19 Thread Isaac Schlueter
On Mon, Apr 18, 2011 at 22:52, Garrett Smith dhtmlkitc...@gmail.com wrote: On 4/18/11, Claus Reinke claus.rei...@talk21.com wrote: The only places where semicolons are ever used in the Node.js package manager are in the 'for' loops headers and at the *beginning* of the lines that would be

Re: Automatic Semicolon Insertion: value vs cost; predictabilityandcontrol; alternatives

2011-04-19 Thread Brendan Eich
On Apr 18, 2011, at 10:52 PM, Garrett Smith wrote: [aside: it would be nice to know who the committee members are, and what the process is for starting an official proposal] Who are the committee members? Ecma TC39 members, a bunch of us self-identify here. Ecma is a standards body, you

Re: Automatic Semicolon Insertion: value vs cost; predictabilityandcontrol; alternatives

2011-04-19 Thread Brendan Eich
On Apr 19, 2011, at 8:39 AM, Isaac Schlueter wrote: This style is more easily scanned. The important tokens are along the left edge, which forms a straight line with logical and orderly breaks, and those tokens are not overused, so their presence or absence is very noticeable. The

Re: Automatic Semicolon Insertion: value vs cost; predictabilityandcontrol; alternatives

2011-04-19 Thread John Tamplin
On Tue, Apr 19, 2011 at 11:52 AM, Brendan Eich bren...@mozilla.com wrote: So ASI does *not* change program behavior from non-error behavior A to non-error behavior B. It instead suppresses early SyntaxError with successful evaluation, in a deterministic way. Is that true even in the return

Re: Automatic Semicolon Insertion: value vs cost; predictabilityandcontrol; alternatives

2011-04-19 Thread Brendan Eich
On Apr 19, 2011, at 9:36 AM, John Tamplin wrote: On Tue, Apr 19, 2011 at 11:52 AM, Brendan Eich bren...@mozilla.com wrote: So ASI does *not* change program behavior from non-error behavior A to non-error behavior B. It instead suppresses early SyntaxError with successful evaluation, in a

Re: Automatic Semicolon Insertion: value vs cost; predictabilityandcontrol; alternatives

2011-04-19 Thread Garrett Smith
On 4/19/11, Brendan Eich bren...@mozilla.com wrote: On Apr 19, 2011, at 8:39 AM, Isaac Schlueter wrote: This style is more easily scanned. The important tokens are along the left edge, which forms a straight line with logical and orderly breaks, and those tokens are not overused, so their

Re: Automatic Semicolon Insertion: value vs cost; predictabilityandcontrol; alternatives

2011-04-19 Thread Isaac Schlueter
On Tue, Apr 19, 2011 at 11:02, Garrett Smith dhtmlkitc...@gmail.com wrote: On 4/19/11, Brendan Eich bren...@mozilla.com wrote: I don't mean to annoy by repeating the same things, but here goes: Is `()` Grouping Operator or Arguments? Is `[]` ArrayLiteral or Property Accessor? Or do these cases

Re: Automatic Semicolon Insertion: value vs cost; predictabilityandcontrol; alternatives

2011-04-19 Thread Garrett Smith
On 4/19/11, Isaac Schlueter i...@izs.me wrote: On Tue, Apr 19, 2011 at 11:02, Garrett Smith dhtmlkitc...@gmail.com wrote: On 4/19/11, Brendan Eich bren...@mozilla.com wrote: I don't mean to annoy by repeating the same things, but here goes: Is `()` Grouping Operator or Arguments? Is `[]`

Re: Automatic Semicolon Insertion: value vs cost; predictabilityandcontrol; alternatives

2011-04-19 Thread Brendan Eich
On Apr 19, 2011, at 11:02 AM, Garrett Smith wrote: I don't mean to annoy by repeating the same things, but here goes: Is `()` Grouping Operator or Arguments? Is `[]` ArrayLiteral or Property Accessor? Or do these cases depend on the preceding token? It depends on the context, but ASI does not

Re: Automatic Semicolon Insertion: value vs cost; predictabilityandcontrol; alternatives

2011-04-19 Thread John Tamplin
On Tue, Apr 19, 2011 at 6:22 PM, Brendan Eich bren...@mozilla.com wrote: Yes. We've discussed this. It's not a change in semantics due to the error-correction aspect of ASI. There is no ASI on this concatenated input! Yes, but given that ASI encourages developers to omit semicolons except

Re: Automatic Semicolon Insertion: value vs cost; predictabilityandcontrol; alternatives

2011-04-19 Thread Brendan Eich
On Apr 19, 2011, at 3:08 PM, Garrett Smith wrote: On 4/19/11, Isaac Schlueter i...@izs.me wrote: ASI didn't change the program behavior. ASI didn't happen in that example. Isaac is correct. Newline elision changed the program behavior. Or newlines being insignificant whitespace, let's

Re: Automatic Semicolon Insertion: value vs cost; predictabilityandcontrol; alternatives

2011-04-19 Thread Brendan Eich
On Apr 19, 2011, at 3:27 PM, John Tamplin wrote: On Tue, Apr 19, 2011 at 6:22 PM, Brendan Eich bren...@mozilla.com wrote: Yes. We've discussed this. It's not a change in semantics due to the error-correction aspect of ASI. There is no ASI on this concatenated input! Yes, but given that ASI

Re: Automatic Semicolon Insertion: value vs cost; predictabilityandcontrol; alternatives

2011-04-19 Thread Garrett Smith
On 4/19/11, Brendan Eich bren...@mozilla.com wrote: On Apr 19, 2011, at 3:08 PM, Garrett Smith wrote: On 4/19/11, Isaac Schlueter i...@izs.me wrote: ASI didn't change the program behavior. ASI didn't happen in that example. Isaac is correct. Newline elision changed the program behavior.

Re: Automatic Semicolon Insertion: value vs cost; predictabilityandcontrol; alternatives

2011-04-19 Thread Garrett Smith
On 4/19/11, Garrett Smith dhtmlkitc...@gmail.com wrote: On 4/19/11, Brendan Eich bren...@mozilla.com wrote: On Apr 19, 2011, at 3:08 PM, Garrett Smith wrote: On 4/19/11, Isaac Schlueter i...@izs.me wrote: ASI didn't change the program behavior. ASI didn't happen in that example. Isaac is

Re: Automatic Semicolon Insertion: value vs cost; predictabilityandcontrol; alternatives

2011-04-19 Thread Brendan Eich
On Apr 19, 2011, at 3:54 PM, Garrett Smith wrote: On 4/19/11, Brendan Eich bren...@mozilla.com wrote: On Apr 19, 2011, at 3:08 PM, Garrett Smith wrote: On 4/19/11, Isaac Schlueter i...@izs.me wrote: Newline elision changed the program behavior. Or newlines being insignificant whitespace,

Re: Automatic Semicolon Insertion: value vs cost; predictabilityandcontrol; alternatives

2011-04-19 Thread Garrett Smith
On 4/19/11, Brendan Eich bren...@mozilla.com wrote: [...] But good point. Indeed, feel free to file a bug at https://bugzilla.mozilla.org asking for such a warning. I'll support it. I'll do it. -- Garrett ___ es-discuss mailing list

Re: Automatic Semicolon Insertion: value vs cost; predictabilityandcontrol; alternatives

2011-04-19 Thread Garrett Smith
On 4/19/11, Brendan Eich bren...@mozilla.com wrote: [...] You are asking for an warning when a file ends without a semicolon required by the grammar, and ASI kicks in. Fair point, good idea. It's not going to do enough by itself, since warnings are easy to miss, and often annoy the wrong party

Re: Automatic Semicolon Insertion: value vs cost; predictabilityandcontrol; alternatives

2011-04-18 Thread François REMY
an external compiler (or IDE). From: Mike Ratcliffe Sent: Monday, April 18, 2011 4:37 PM To: es-discuss@mozilla.org Subject: Re: Automatic Semicolon Insertion: value vs cost; predictabilityandcontrol; alternatives Jorge, I would opt in for warnings e.g. if I planned on minifying my web app

Re: Automatic Semicolon Insertion: value vs cost; predictabilityandcontrol; alternatives

2011-04-18 Thread Garrett Smith
On 4/18/11, Claus Reinke claus.rei...@talk21.com wrote: The only places where semicolons are ever used in the Node.js package manager are in the 'for' loops headers and at the *beginning* of the lines that would be interpreted incorrectly because of the lack of the semicolon at the end of the