excluding features from sloppy mode

Brian Terlson Brian.Terlson at microsoft.com
Wed Jan 2 15:08:55 PST 2013


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
> 




More information about the es-discuss mailing list