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

The "continue" vote.

Expand Messages
  • pauanyu
    I think JSLint should complain about continue , but have an option to turn it off, if you want. I don t see that listed as an option in the poll, however.
    Message 1 of 8 , Jun 20, 2009
    • 0 Attachment
      I think JSLint should complain about "continue", but have an option to turn it off, if you want.

      I don't see that listed as an option in the poll, however. It's very bipolar: either warn about "continue" or don't.

      Where's the third option? Put another way, "if JSLint did warn about continue, would it also have an option to turn it off?"
    • Michael Lorton
      Pretty much everything in JSLint has an option to turn it off. M. ________________________________ From: pauanyu To:
      Message 2 of 8 , Jun 21, 2009
      • 0 Attachment
        Pretty much everything in JSLint has an option to turn it off.

        M.






        ________________________________
        From: pauanyu <pcxunlimited@...>
        To: jslint_com@yahoogroups.com
        Sent: Saturday, June 20, 2009 11:52:00 PM
        Subject: [jslint] The "continue" vote.

        I think JSLint should complain about "continue", but have an option to turn it off, if you want.

        I don't see that listed as an option in the poll, however. It's very bipolar: either warn about "continue" or don't.

        Where's the third option? Put another way, "if JSLint did warn about continue, would it also have an option to turn it off?"



        ------------------------------------

        Yahoo! Groups Links



        [Non-text portions of this message have been removed]
      • pauanyu
        ... Yes, but not everything.. you can t turn off this: if (condition) doSomething; while (condition) doSomething; There are others as well, I m sure, such as
        Message 3 of 8 , Jun 21, 2009
        • 0 Attachment
          --- In jslint_com@yahoogroups.com, Michael Lorton <mlorton@...> wrote:
          >
          > Pretty much everything in JSLint has an option to turn it off.
          >
          > M.
          >

          Yes, but not everything.. you can't turn off this:

          if (condition) doSomething;
          while (condition) doSomething;


          There are others as well, I'm sure, such as the "with" statement. It's a legitimate question to ask whether we will have an option or not.
        • Douglas Crockford
          ... I don t think continue is important enough to get an option. So the question is should it be treated as with. I think continue is unnecessary. There are a
          Message 4 of 8 , Jun 21, 2009
          • 0 Attachment
            --- In jslint_com@yahoogroups.com, Michael Lorton <mlorton@...> wrote:
            >
            > Pretty much everything in JSLint has an option to turn it off.

            I don't think continue is important enough to get an option. So the question is should it be treated as with.

            I think continue is unnecessary. There are a few good programmers who use it. I think they would be better off if they didn't, but I think this may not be a good tradeoff. Removal of continue adds little value, so I can understand why some would not want to do it.

            The abusive case with continue is with labeled blocks. JSLint already forbids that, so the remaining uses of continue display inexperience, but no real danger.
          • Michael Lorton
            Huh. Didn t know about that one. Maybe we should have JSUnLint, goes through and corrects any correctable errors; e.g., put the missing braces around the
            Message 5 of 8 , Jun 21, 2009
            • 0 Attachment
              Huh. Didn't know about that one. Maybe we should have JSUnLint, goes through and corrects any correctable errors; e.g., put the missing braces around the one-line blocks, put in missing semicolons, that sort of thing. (I doubt it could fix "continue".)

              M.

              No-one should rent. Buy this house.





              ________________________________
              From: pauanyu <pcxunlimited@...>
              To: jslint_com@yahoogroups.com
              Sent: Sunday, June 21, 2009 1:10:57 AM
              Subject: Re: [jslint] The "continue" vote.

              --- In jslint_com@yahoogroups.com, Michael Lorton <mlorton@...> wrote:
              >
              > Pretty much everything in JSLint has an option to turn it off.
              >
              > M.
              >

              Yes, but not everything.. you can't turn off this:

              if (condition) doSomething;
              while (condition) doSomething;


              There are others as well, I'm sure, such as the "with" statement. It's a legitimate question to ask whether we will have an option or not.



              ------------------------------------

              Yahoo! Groups Links



              [Non-text portions of this message have been removed]
            • pauanyu
              ... I believe there are already several JavaScript beautifiers , designed to unminify code. I m sure they could support something like this.
              Message 6 of 8 , Jun 21, 2009
              • 0 Attachment
                --- In jslint_com@yahoogroups.com, Michael Lorton <mlorton@...> wrote:
                >
                > Huh. Didn't know about that one. Maybe we should have JSUnLint, goes through and corrects any correctable errors; e.g., put the missing braces around the one-line blocks, put in missing semicolons, that sort of thing. (I doubt it could fix "continue".)
                >
                > M.
                >
                > No-one should rent. Buy this house.
                >

                I believe there are already several JavaScript "beautifiers", designed to unminify code. I'm sure they could support something like this.
              • sandyhead25
                ... There is a reason why the YUI compressor is in Java and is not available in JavaScript. It adds curly braces to conditions which do not have them and it
                Message 7 of 8 , Jun 22, 2009
                • 0 Attachment
                  --- In jslint_com@yahoogroups.com, Michael Lorton <mlorton@...> wrote:
                  >
                  > Huh. Didn't know about that one. Maybe we should have JSUnLint, goes through and corrects any correctable errors; e.g., put the missing braces around the one-line blocks, put in missing semicolons, that sort of thing. (I doubt it could fix "continue".)
                  >
                  > M.
                  >
                  > No-one should rent. Buy this house.

                  There is a reason why the YUI compressor is in Java and is not available in JavaScript. It adds curly braces to conditions which do not have them and it adds semicolons where they should be. This is the only way to get really crappy JavaScript minified to a single line.

                  JSMin, however does not add semicolons or curly braces. It, instead, preserves line breaks where semicolons should be but are missing. I have attempted to write my own semicolon insertion mechanism and it is so incredibly slow even the code to accomplish this is relatively small. Adding such functionality to JSLint would make JSLint 5-6 times slower at least.

                  JSLint should never be allowed to write your code for you. This defeats the purpose of JSLint, which is to display errors and encourage best practices.
                • pauanyu
                  ... I believe he was referring to a new program, separate from JSLint, and not JSLint itself. Note how he said JSUnLint as opposed to JSLint .
                  Message 8 of 8 , Jun 22, 2009
                  • 0 Attachment
                    --- In jslint_com@yahoogroups.com, "sandyhead25" <austin.cheney@...> wrote:
                    >
                    > There is a reason why the YUI compressor is in Java and is not available in JavaScript. It adds curly braces to conditions which do not have them and it adds semicolons where they should be. This is the only way to get really crappy JavaScript minified to a single line.
                    >
                    > JSMin, however does not add semicolons or curly braces. It, instead, preserves line breaks where semicolons should be but are missing. I have attempted to write my own semicolon insertion mechanism and it is so incredibly slow even the code to accomplish this is relatively small. Adding such functionality to JSLint would make JSLint 5-6 times slower at least.
                    >
                    > JSLint should never be allowed to write your code for you. This defeats the purpose of JSLint, which is to display errors and encourage best practices.
                    >

                    I believe he was referring to a new program, separate from JSLint, and not JSLint itself.

                    Note how he said "JSUnLint" as opposed to "JSLint".
                  Your message has been successfully submitted and would be delivered to recipients shortly.