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

2261Re: [jslint] Re: option.type

Expand Messages
  • John Hawkinson
    Jun 5, 2011
      Douglas Crockford <douglas@...> wrote on Mon, 6 Jun 2011
      at 01:18:59 -0000 in <ish9u3+tj8c@...>:

      > Has anyone tried the new type consistency checking?
      > Has anyone found it to be useful?

      This consequence appears to be undesirable:

      Problem at line 1 character 34: Type inconsistency: string and number.

      var mixed="The value is three ("+3+")";

      An oversimplified example, but it's common to mix strings and numbers
      together knowing that the numbers will be converted to string.

      Also true for strings + booleans. It seems to fire on a lot of
      debugging statements in my code.

      --jhawk@...
      John Hawkinson
    • Show all 9 messages in this topic