On 18/04/2011, at 16:37, Mike Ratcliffe wrote:
Jorge, I would opt in for warnings e.g. if I planned on minifying my web app
in the future. Most web apps will burn in hell if they are missing semicolons
when you minify them.
Indeed, for some minifiers it's a must.
These minifiers avoid
2011/4/19 Bob Nystrom rnyst...@google.com:
On Mon, Apr 18, 2011 at 7:46 PM, Mike Samuel mikesam...@gmail.com wrote:
If I understand semicolon elision, then
myLabel:
for (;;) {}
would be interpreted as
myLabel: ;
for (;;) {}
I'm still learning to details of the ES grammar, but I didn't
On Tue, Apr 19, 2011 at 09:57, Jorge jo...@jorgechamorro.com wrote:
Most web apps will burn in hell if they are missing semicolons when you
minify them.
Indeed, for some minifiers it's a must.
Which minifiers?
Closure, yuicompressor, jsmin, packer, and uglify all handle ASI
without so much
2011/4/19 Bob Nystrom rnyst...@google.com:
On Mon, Apr 18, 2011 at 7:46 PM, Mike Samuel mikesam...@gmail.com wrote:
var x = foo
+ bar
That's true. I believe in languages that default to treating newlines as
significant, the style is to put a binary operator at the end of the line
and
On 19/04/2011, at 19:52, Isaac Schlueter wrote:
On Tue, Apr 19, 2011 at 09:57, Jorge jo...@jorgechamorro.com wrote:
Most web apps will burn in hell if they are missing semicolons when you
minify them.
Indeed, for some minifiers it's a must.
Which minifiers?
I don't know, the ones that
I think there are a large number of programmers who, because of those
java style guidelines and the way ASI works, write javascript breaking
before operators except for comma operators.
http://www.google.com/codesearch?q=%5Cx20%5Cx20%5Cx20%5B%2B-%5D%5B
^%2B-%5D+lang%3Ajavascript
shows
On Tue, Apr 19, 2011 at 2:53 PM, Bob Nystrom rnyst...@google.com wrote:
I think there are a large number of programmers who, because of those
java style guidelines and the way ASI works, write javascript breaking
before operators except for comma operators.
var a = 1
+ 2
// a = 1
var a = (1
+ 2)
// a = 3
Ok, so you are advocating that adding extra parens is less typing and less
prone to error than adding semicolons?
Yes, adding extra parens where needed and omitting ; is less typing. To
verify, I just went through a bunch of
On Tue, Apr 19, 2011 at 11:53, Jorge jo...@jorgechamorro.com wrote:
Which minifiers?
I don't know, the ones that make web apps burn in hell if they are missing
semicolons.
Until someone can point to an actual minifier that's actually affected
by this, I think the whole minification requires
On Mon, Apr 18, 2011 at 3:12 AM, Oliver Hunt oli...@apple.com wrote:
An implementation _could_ add a mode (*shudder*) along the same lines as
strict mode:
die in hell ASI, i hate you with the fiery passion of a thousand burning
suns.;
And then make it a syntax error whenever ASI would
On 18/04/2011, at 09:52, Peter van der Zee wrote:
On Mon, Apr 18, 2011 at 3:12 AM, Oliver Hunt oli...@apple.com wrote:
An implementation _could_ add a mode (*shudder*) along the same lines as
strict mode:
die in hell ASI, i hate you with the fiery passion of a thousand burning
suns.;
And
On Mon, Apr 18, 2011 at 12:34 PM, Jorge jo...@jorgechamorro.com wrote:
What am I missing ?
As far as the directive goes, they are opt-in. Old code won't be opting in.
Other than that they have the same issues as use strict might have.
- peter
___
On 18/04/2011, at 13:10, Peter van der Zee wrote:
On Mon, Apr 18, 2011 at 12:34 PM, Jorge jo...@jorgechamorro.com wrote:
What am I missing ?
As far as the directive goes, they are opt-in. Old code won't be opting in.
Other than that they have the same issues as use strict might have.
But
Hi Everyone,
Just to add some out-of-the-browser perspective to the discussion, and since
Node.js was mentioned by name in this thread, I believe it is important to
note that the package manager for Node.js absolutely *depends* on the
automatic semicolon insertion working just the way it works
Jorge, I would opt in for warnings e.g. if I planned on minifying my
web app in the future. Most web apps will burn in hell if they are
missing semicolons when you minify them.
On 04/18/2011 02:42 PM, Jorge wrote:
On 18/04/2011, at 13:10, Peter van
See http://www.mail-archive.com/es-discuss@mozilla.org/msg05609.html and
earlier posts in that thread, for where
no asi;
as a Harmony pragma was tossed out as possible syntax.
The agreement we seemed to reach was simply to have a way for programmers to
disable ASI, not try a complex new-ASI
On Apr 18, 2011, at 12:24 AM, Garrett Smith wrote:
Implementations are motivated to get scripts working and conform to
specs. How could Ecma encourage developers to stop using ASI? I
initially thought that standard warnings in strict mode would help.
No. My earlier reply to your previous post
On 2011-04-18, at 13:48, Brendan Eich wrote:
Do popular minifiers still not parse and insert semicolons (and remove
newlines) as needed?
Only the broken ones! :)
___
es-discuss mailing list
es-discuss@mozilla.org
On Mon, Apr 18, 2011 at 05:42, Jorge jo...@jorgechamorro.com wrote:
I understand that it would be quite interesting to get a warning/error in
this case:
a= b
(c= d)();
...only that there's no ASI in this case !
Jorge touches on the reason why the whole debate about ASI is a bit
misguided, in
On Mon, Apr 18, 2011 at 11:05, Brendan Eich bren...@mozilla.com wrote:
Given the primary problem is not ASI but its absence where users expect it
due to mistakenly believing a newline is significant, one could argue the fix
is not to ban ASI and tax everyone with writing lots of insignificant
On Mon, Apr 18, 2011 at 12:22, Brendan Eich bren...@mozilla.com wrote:
I agree, but in a friendly spirit suggest typing ; is a tax too, however much
lesser.
True, I overstated. It *is* a keyboard tax. But (at least in my
experience) I tend to type code in a moment, and then read it for the
However, given the reality of ASI, in practice there are two ways to
terminate statements. Then the question becomes, what is more usable,
optionally turning off ASI, or under prior opt-in to Harmony, improving ASI?
I would love to be able to ditch my ; in JS. There are other languages
that
2011/4/18 Bob Nystrom rnyst...@google.com:
The semicolon elision rules from what I've seen are a good bit simpler than
the current insertion ones: If a token that can't end an expression or
statement precedes a newline, eat the newline.
If I understand semicolon elision, then
myLabel:
for
7:07 PM
To: Brendan Eich
Cc: es-discuss@mozilla.org
Subject: Re: Automatic Semicolon Insertion: value vs cost; predictability
andcontrol; alternatives
On 4/17/11, Brendan Eich bren...@mozilla.com wrote:
On Apr 17, 2011, at 10:52 AM, Claus Reinke wrote:
[TLDR]
ASI is not going to be removed. I
To: Brendan Eich
Cc: es-discuss@mozilla.org
Subject: Re: Automatic Semicolon Insertion:
value vs cost; predictability andcontrol; alternatives
On 4/17/11
On 4/17/11, Mike Ratcliffe mratcli...@mozilla.com wrote:
I remember going over a few hundred thousand lines of JavaScript and adding
semicolons because I had decided to minify it. I also remember that for
months I was receiving bug reports from sections of code where I had missed
the
On Apr 17, 2011, at 12:33 PM, Mike Ratcliffe wrote:
...
Personally I would welcome some kind of option to disable ASI with open arms.
Garrett's strict mode warning idea makes sense to me but I am fairly certain
that not everybody would welcome it.
~
I'd suggest that this isn't really a
On 4/17/11, Allen Wirfs-Brock al...@wirfs-brock.com wrote:
On Apr 17, 2011, at 12:33 PM, Mike Ratcliffe wrote:
...
Personally I would welcome some kind of option to disable ASI with open
arms. Garrett's strict mode warning idea makes sense to me but I am fairly
certain that not everybody
An implementation _could_ add a mode (*shudder*) along the same lines as strict
mode:
die in hell ASI, i hate you with the fiery passion of a thousand burning
suns.;
And then make it a syntax error whenever ASI would occur. I have considered
this in JSC (albeit with a slightly shorter opt in
29 matches
Mail list logo