> Le 26 mai 2016 à 17:02, Mark Miller <[email protected]> a écrit : > > I don't get it. What is being removed?
A way to observe (almost surely?) that a given ECMAScript function is strict. > What purpose does this accomplish? As I've said, maybe nothing to care about. That strange capability of `Function#arguments` just presented itself to my mind, and I really didn’t thought whether that has any consequence. —Claude > > > On Thu, May 26, 2016 at 4:03 PM, Claude Pache <[email protected] > <mailto:[email protected]>> wrote: > >> Le 26 mai 2016 à 13:23, Mark S. Miller <[email protected] >> <mailto:[email protected]>> a écrit : >> >> >> >> On Thu, May 26, 2016 at 11:25 AM, Claude Pache <[email protected] >> <mailto:[email protected]>> wrote: >> >> > Le 26 mai 2016 à 10:43, G. Kay Lee <[email protected] >> > <mailto:balancetraveller%[email protected]>> a écrit : >> > >> > I was under the impression that strict mode is a (temporary) workaround to >> > get rid of unwanted bad parts of the language without instantly breaking >> > anything. The long term question thus should be: do we have a timeline on >> > the final removal of non-strict behavior from the language, and establish >> > the "strict mode" as the one and only standard behavior. If so, then >> > introducing any additional language feature to help detecting >> > strict/non-strict is certainly not ideal. >> >> AFAIK, there is no plan to remove non-strict mode. >> >> And to be clear about my intentions, what I have in the back of my head was >> certainly not "introducing any additional language feature to help detecting >> strict/non-strict" (yuck!), but whether it makes sense to think about a >> possible way to remove that leak from `Function#arguments` and >> `Function#caller`. But it would be premature to consider that issue without >> *at least* an answer to my original question: Are there other ways...? >> >> Hi Claude, what do you mean by "remove that leak"? Hypothetically, let's say >> you had such a test and that it was reliable. How would you use it remove >> the leak? (This is probably also the best way to clarify what precisely you >> mean by removing the leak.) > > Maybe that "leak", namely observing whether a function is strict, is not > something to care about. > > But here is what I think to be a possible way to remove it: Because > `Function#arguments` and `Function#caller` do return `null` for sloppy > functions in some circumstances (namely, when the function is not found in > the call stack), let them always return `null` for non-sloppy functions. > > —Claude > > > _______________________________________________ > es-discuss mailing list > [email protected] <mailto:[email protected]> > https://mail.mozilla.org/listinfo/es-discuss > <https://mail.mozilla.org/listinfo/es-discuss> > > > > > -- > Cheers, > --MarkM
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

