On 4/17/11, Jason Orendorff <[email protected]> wrote:
> On Sun, Apr 17, 2011 at 12:07 PM, Garrett Smith <[email protected]>
> wrote:
>> On 4/17/11, Brendan Eich <[email protected]> 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?
>
> We have a saying at Mozilla: "Don't break the web."
>
> If a browser vendor removed ASI support from their ES engine, many
> existing sites would stop working. Their users would switch to other
> browsers.
>
I wrote eventually. As naive as it may seem, it is conceivable that
newly written scripts could be authored so that they don't rely on ASI
("yeah right," you say). And if that happened then the number of
scripts that rely on ASI would diminish in number.
ASI is often unintentional. If I do that (and I have) I definitely
wnat to know right away; not after I deploy my app. Intell-J warns for
this in the js editor. A standard warning for ASI would be helpful in
this way.
I know it sounds fantastical, but before saying "impossible," think
about this: What effectively discourage authors from using ASI
(intentionally or otherwise)?
>> 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")
>
> Most ES runs in browsers. If a browser shows a warning, it shows it to
> the end user of a web site--the wrong person.
>
Why must the browser show the message to the end user? I didn't
suggest that, so why are you? The implementation (script engine) can
emit warnings (for Firebug, MSIE debugger, etc).
My idea for "standard warnings" comes from my contempt for things like this:
"It is recommended that ECMAScript implementations either disallow
this usage of FunctionDeclaration or issue a warning when such a usage
is encountered. " which mentions "warnings" but the spec doesn't say
what a warning really is.
--
Garrett
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss