Re: Observing whether a function is strict

2016-05-26 Thread Claude Pache
ion#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 >>

Re: Observing whether a function is strict

2016-05-26 Thread Mark Miller
er`. 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 yo

Re: Observing whether a function is strict

2016-05-26 Thread Claude Pache
re 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 &

Re: Observing whether a function is strict

2016-05-26 Thread Mark S. Miller
On Thu, May 26, 2016 at 1:23 PM, Mark S. Miller wrote: > > > On Thu, May 26, 2016 at 11:25 AM, Claude Pache > wrote: > >> >> > Le 26 mai 2016 à 10:43, G. Kay Lee < >> balancetraveller+es-disc...@gmail.com> a écrit : >> > >> > I was under the

Re: Observing whether a function is strict

2016-05-26 Thread Mark S. Miller
On Thu, May 26, 2016 at 11:25 AM, Claude Pache wrote: > > > Le 26 mai 2016 à 10:43, G. Kay Lee < > balancetraveller+es-disc...@gmail.com> a écrit : > > > > I was under the impression that strict mode is a (temporary) workaround > to get rid of unwanted bad parts of the

Re: Observing whether a function is strict

2016-05-26 Thread Claude Pache
> Le 26 mai 2016 à 10:43, G. Kay Lee 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:

Re: Observing whether a function is strict

2016-05-26 Thread Isiah Meadows
I would be mostly okay if sloppy mode goes away. The only use case I have now for it is for accessing the global in a platform independent manner, but the System.global proposal eliminates this need. I write all code in strict mode now, so I only see likely performance benefits from completely

Re: Observing whether a function is strict

2016-05-26 Thread G. Kay Lee
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

Re: Observing whether a function is strict

2016-05-26 Thread Claude Pache
> Le 26 mai 2016 à 09:57, Mathias Bynens a écrit : > > On Thu, May 26, 2016 at 9:48 AM, Claude Pache wrote: >> I was wondering whether there is a way to observe whether a given random >> function is strict (or sloppy, or neither). >> […] Are there

Re: Observing whether a function is strict

2016-05-26 Thread Mathias Bynens
On Thu, May 26, 2016 at 9:48 AM, Claude Pache wrote: > I was wondering whether there is a way to observe whether a given random > function is strict (or sloppy, or neither). > […] Are there other ways? (If not, I find it somewhat unfortunate that only > such nonstandard

Observing whether a function is strict

2016-05-26 Thread Claude Pache
Hi, I was wondering whether there is a way to observe whether a given random function is strict (or sloppy, or neither). Apart from flawed guess based on `Function#toString` (flawed, because it could only detect "use strict" prologue, which is insufficient), the only way I see is to observe