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

2986Re: [jslint] Array construction bug

Expand Messages
  • Martin Cooper
    Aug 31, 2012
      On Fri, Aug 31, 2012 at 8:09 AM, IcedNet Development Team
      <dev@...> wrote:
      > You may not code for "noobs", but you will have new hires, and you will document that one-liner or have to explain it, even to professionals...
      > Knowing how to code in js does not necessarily mean that everyone has read "The Good Parts" or any of the exhaustive tomes that actually mention the misbehavior of core javascript...
      > Clever code is not clever, and that line could mean anything, let alone relying on the moving target that is js...

      It's not supposed to be "clever". I am only trying to use a feature
      that exists in the language. If the feature wasn't intended to be
      used, it wouldn't be there. To say that that tiny amount of code
      "could mean anything" is absurd.

      > I see no bug here.

      Setting aside whether people agree or disagree with my particular use
      case, the fact is that JSLint provides *no* way for me to take
      advantage of this specific feature of the JavaScript language. None.
      There is no "off" switch for this. That is a bug.

      --
      Martin Cooper


      > .02 worth
      >
      > Peace,
      > Dan
      >
      >
      > On 2012/08 /31, at 10:07 AM, Martin Cooper wrote:
      >
      >>
      >>
      >> If I want to create, say, a separator line of 'len' dashes, I can do
      >> that really cleanly and easily with:
      >>
      >> var separator = Array(len).join('-');
      >>
      >> If there's a one-liner that is just as simple, clean, and obvious as
      >> that, I'll be happy to use it. But please don't tell me I have to dumb
      >> down my code and use a multi-line function to do something that works
      >> perfectly well - until I try to get it past JSLint.
      >>
      >> --
      >> Martin Cooper
      >>
      >> > ------------------------------------
      >> >
      >> > Yahoo! Groups Links
      >> >
      >> >
      >>
      >>
      >
      >
      >
      > [Non-text portions of this message have been removed]
      >
      >
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >
      >
      >
    • Show all 21 messages in this topic