3016Re: [jslint] `this` in anonymous function without strict violation?
- Sep 20, 2012Sorry, that was a typo. I meant to say "there are other things you cannot do with the function *statement*".
As for the error, to elaborate on what Douglas said, that "People who are using the expression form are more likely to know what they are doing," this is one place where an arbitrary line was drawn for catching potential programming mistakes. While neither form could be used in place, he decided that the expression form was more likely to indicate the programmer intends to call it with a context.
From: Felix E. Klee <felix.klee@...>
Sent: Thursday, 20 September 2012, 0:59
Subject: Re: [jslint] `this` in anonymous function without strict violation?
On Thu, Sep 20, 2012 at 4:52 AM, Emmett Pickerel
> The function statement is evaluated at the top of the current scope,I am aware of that. However, that's not what the error message is about.
> regardless of physical location. The function expression is evaluated
> at the same time as any other expression would be.
> Obviously, there are other things you cannot do with the functionLike what?
> expression, [...]
[Non-text portions of this message have been removed]
- << Previous post in topic Next post in topic >>