excluding features from sloppy mode

Brendan Eich brendan at mozilla.com
Wed Jan 2 15:37:47 PST 2013


This is good evidence to have, thanks.

It still doesn't mean that, for any such content whose owner decides to 
change a parameter to use destructuring, we can't link a ban on 
duplicate formals with that destructuring opt-in-by-its-own-new-syntax 
in ES6 sloppy mode. It's nowhere near enough duplicate formal usage to 
give me pause, at any rate.

Anyone maintaining these functions might rather find out about 
unintended duplicates!

/be

Brian Terlson wrote:
> I was already looking into something similar so I checked my dataset of scripts from 2235 sites and found only one example of duplicate identifier names: vnexpress.net. Here's the decl
>
>      function GetTopicHTML(sId,sTitle,sDate,sPath,sType,sPath,arItem,vType1,vType2,vCustomTitle,vShowHeader){
>
> Notice sPath is duplicated. However, sPath is subsequently never used at all, so I'm not sure what the intent was here. Possibly just a bug or cruft.
>
> That said, _ is being used to ignore parameters on 36 sites. Most commonly this is jQuery library usage (ignoring the first index parameter of forEach, for example) but a good number of other examples exist. I can provide more details if people are interested.
>
>> -----Original Message-----
>> From: es-discuss-bounces at mozilla.org [mailto:es-discuss-
>> bounces at mozilla.org] On Behalf Of Brendan Eich
>> Sent: Saturday, December 29, 2012 7:10 PM
>> To: Domenic Denicola
>> Cc: Mark S. Miller; es-discuss at mozilla.org
>> Subject: Re: excluding features from sloppy mode
>>
>> Domenic Denicola wrote:
>>> Duplicate parameters are quite common in the following case:
>>>
>>> callSomething(function (_, _, whatIActuallyCareAbout) {});
>> I've never seen that in JS. In ML, sure.
>>
>> Have you any links to cite?
>>
>> /be
>>
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>>
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>


More information about the es-discuss mailing list