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

1377Re: explanations for some options

Expand Messages
  • pauanyu
    Jul 19, 2010
      nomen: Some developers use a _ to mean "hidden" or "private" properties, but they are not actually hidden at all. They are visible just like all others. If you really want it to be hidden, use a local variable with a closure.

      regexp: The rationale behind this is that some people don't understand what . and [^...] mean in regular expressions, so it causes their code to either accept something as valid when it isn't, or reject something that's valid.

      strict: "use strict" turns on ECMAScript 5's strict mode. This fixes numerous flaws in JavaScript, and also causes some bad stuff to throw an error, rather than failing silently. I think it's definitely a good thing to use this whenever you can.

      --- In jslint_com@yahoogroups.com, Mark Volkmann <r.mark.volkmann@...> wrote:
      >
      > I'm trying to understand the rationale behind three of the "Good
      > Parts" options and haven't quite figured them out from the short
      > descriptions on the web site. Can someone give me a brief explanation
      > for why turning these options on is a good idea? I'm not looking to
      > debate them. I just want to understand the issues they avoid.
      >
      > nomen
      > regexp
      > strict
      >
      > --
      > R. Mark Volkmann
      > Object Computing, Inc.
      >
    • Show all 6 messages in this topic