<div dir="ltr"><div>Just enabling this warning for content makes no sense, because this is Firefox only feature we don't expect content to use this feature at all. We want to give Firefox and Add-on developers time so that we can remove this non-standard extension at some point.<br>
<br></div>This is also just a warning, so nothing should break and we could get rid of the warnings step by step.<br><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 9, 2014 at 7:38 PM, Gavin Sharp <span dir="ltr"><<a href="mailto:gavin@gavinsharp.com" target="_blank">gavin@gavinsharp.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What's the goal of the warning patch? Can you make it apply to content<br>
only to start, while we separately address the problem of converting<br>
chrome code?<br>
<span class="HOEnZb"><font color="#888888"><br>
Gavin<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Mon, Jun 9, 2014 at 10:33 AM, Tom Schuster <<a href="mailto:tom@schuster.me">tom@schuster.me</a>> wrote:<br>
> I think we should replace shorthand functions with arrow functions when ever<br>
> possible. The situation with getters/setters is a little bit sad, but it's<br>
> not really *so* much more characters to really make this horrible.<br>
><br>
> So back to my main point, can I just land this? I am slightly afraid this<br>
> would push us over some tbpl log limit!<br>
><br>
> -Tom<br>
><br>
><br>
> On Mon, Jun 9, 2014 at 7:14 PM, Felipe G <<a href="mailto:felipc@gmail.com">felipc@gmail.com</a>> wrote:<br>
>><br>
>> The footgun argument is not very strong because arrow functions provide<br>
>> the same footgun ;)  Unless the policy is to reject the shorthand version?<br>
>><br>
>> And unfortunately we can't replace most of the usages with arrow functions<br>
>> because they are often defined as class functions in objects/prototypes<br>
>> where the `this` value needs to be bound to the object instance. So we would<br>
>> need to replace them with the long version of regular functions.<br>
>><br>
>><br>
>> On Mon, Jun 9, 2014 at 1:42 PM, Richard Newman <<a href="mailto:rnewman@mozilla.com">rnewman@mozilla.com</a>><br>
>> wrote:<br>
>>><br>
>>> > Since the syntax is so similar, I think that is a better argument for<br>
>>> > migrating to standard arrow functions rather than keeping the non-standard<br>
>>> > syntax. The JS team has an ongoing goal to remove SpiderMonkey's<br>
>>> > non-standard language extensions.<br>
>>><br>
>>> Also, some of us have had a review policy (for years!) of rejecting the<br>
>>> non-standard syntax. Not only does it break syntax hilighting in some<br>
>>> editors, but it's a gigantic footgun:<br>
>>><br>
>>>   function(a) a + 1<br>
>>><br>
>>> is very easy to screw up into<br>
>>><br>
>>>   function(a) {<br>
>>>     log("Wee!");<br>
>>>     a + 1;<br>
>>>   }<br>
>>><br>
>>> which of course won't work at all. (Yes, I've seen this happen in the<br>
>>> wild.)<br>
>>><br>
>>> I'll be glad to see it gone. Just use arrows.<br>
>>> _______________________________________________<br>
>>> firefox-dev mailing list<br>
>>> <a href="mailto:firefox-dev@mozilla.org">firefox-dev@mozilla.org</a><br>
>>> <a href="https://mail.mozilla.org/listinfo/firefox-dev" target="_blank">https://mail.mozilla.org/listinfo/firefox-dev</a><br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> firefox-dev mailing list<br>
>> <a href="mailto:firefox-dev@mozilla.org">firefox-dev@mozilla.org</a><br>
>> <a href="https://mail.mozilla.org/listinfo/firefox-dev" target="_blank">https://mail.mozilla.org/listinfo/firefox-dev</a><br>
>><br>
><br>
><br>
> _______________________________________________<br>
> firefox-dev mailing list<br>
> <a href="mailto:firefox-dev@mozilla.org">firefox-dev@mozilla.org</a><br>
> <a href="https://mail.mozilla.org/listinfo/firefox-dev" target="_blank">https://mail.mozilla.org/listinfo/firefox-dev</a><br>
><br>
</div></div></blockquote></div><br></div></div></div></div>