Loading ...
Sorry, an error occurred while loading the content.

3016Re: [jslint] `this` in anonymous function without strict violation?

Expand Messages
  • Doc Emmett Splendid
    Sep 20, 2012
    • 0 Attachment
      Sorry, 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.

      Emmett


      ________________________________
      From: Felix E. Klee <felix.klee@...>
      To: jslint_com@yahoogroups.com
      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
      <emmett.thesane@...> wrote:
      > The function statement is evaluated at the top of the current scope,
      > regardless of physical location. The function expression is evaluated
      > at the same time as any other expression would be.

      I am aware of that. However, that's not what the error message is about.

      > Obviously, there are other things you cannot do with the function
      > expression, [...]

      Like what?



      [Non-text portions of this message have been removed]
    • Show all 14 messages in this topic