arguments.callee in Harmony

Charles Jolley charles at sproutit.com
Fri Sep 25 16:07:18 PDT 2009


> These are certainly idioms, especially the first test (as in "kick  
> the bucket", something an ES3 programmer could not understand based  
> on the terms in the code alone, only by also reading the ES5 spec or  
> a book based on it). Do they deserve sugar?

To me this would be something that should be sugar'd simply because it  
will be so common.  It would be nice not to end up with 100 different  
ways of testing for ES5 strict mode support like we have today for  
testing an Array.

Also, this would clearly convey to the casual developer that you  
expect them to branch their code in some cases when trying to maintain  
backwards compatibility.

I would think the most useful test would be "is strict mode available"  
not "am I currently strict" since you can assume the later from the  
former but not the reverse.

I suppose we could always just use browser sniffing. ;-)

-Charles

>
> /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