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

2845Re: [jslint] option.stupid

Expand Messages
  • Mark Volkmann
    Mar 30, 2012
      I agree with Martin. Why not fix this by changing the name of the option to
      "sync" and have it default to false?

      R. Mark Volkmann
      Object Computing, Inc.

      On Mar 30, 2012, at 7:55 PM, Martin Cooper <mfncooper@...> wrote:

      On Fri, Mar 30, 2012 at 11:08 AM, douglascrockford
      <douglas@...> wrote:
      > JSLint now warns when properties contain the substring 'Sync'. The use of
      that substring in Nodejs is to identify methods that can cause blockage.
      Such methods should never be used.

      There are numerous valid and reasonable use cases for synchronous code
      in Node.js. To declare the use of sync functions to be universally
      "stupid" suggests a distinct lack of consideration for the breadth of
      use cases that Node.js is being used to address.

      Two very simple and very common examples of where synchronous
      functions are frequently used in Node.js code are command line tools,
      for which async often makes little sense and only complicates the
      code, and loading server config at start-up time, for similar reasons.

      In both of those cases, you *could* use async code. But when there is
      no good reason for the code to be async, and the sync code would be
      simpler and easier to write, debug, read and maintain, it is
      absolutely not "stupid" to make the decision to use the synchronous

      To tell people that they need to "tolerate stupidity" in order to take
      the most appropriate approach for their use cases is inappropriate at

      Martin Cooper

      > These useful warnings can be suppressed by using the new Tolerate
      stupidity option.
      > ------------------------------------
      > Yahoo! Groups Links

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