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 semicolons.

Now I am obsessed with adding semicolons everywhere that they should go.

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.
~
Mike Ratcliffe

On 17.04.2011 19:18, François REMY wrote:
I’m a developper and I don’t want to phase ASI out.
If you consider Visual Basic .NET, they are starting to
relax line ending, and it’s really appraised.
 
Typing semicolons is pointless. It doesn’t add any value
to your code. It only takes time.
 
 
Sent: Sunday, April 17, 2011 7:07 PM
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 don't know why you think it could be.
>
Why not? Iif developers would stop doing that then eventually, can't
it be removed?

It is not hard at all to write code that does not rely on ASI.

Existing code that relies on ASI would fail, so making ASI an error
today would not be feasible because many sites would break.

It might sound naive, but can ASI be phased-out? How can we get
developers to stop using ASI?

Can ASI be made to be an error for strict mode? IIRC Asen proposed
that a couple of years ago. What if ASI were to trigger a warning to
developers?

ES5 does not define warning. By warning, I mean an error condition
that is reported by the implementation but does not trigger abrupt
completion ("Deprecated production: missing semicolon, line 29"). The
warning may be hidden but activated in a debugging environment (as
optionally provided by the implementation).
--
Garrett
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss


_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to