Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -----Original Message-----
- From: Michael Dayah [mailto:michael@*****.com]
- Sent: Sunday, December 21, 2008 9:57 PM
- To: douglas@*****.com
- Subject: Allow disable of: blocks require { }
- Thanks for creating this tool. I'm interested in ferreting out all the implied globals I've defined, and maybe make some other improvements.
- However, I'm not interested in enclosing all my single-line blocks with { }. Could you please allow us to disable this warning?
- Thanks,
- Michael
- -----Original Message-----
- From: Michael Dayah [mailto:michael@*****.com]
- Sent: Monday, December 22, 2008 1:46 PM
- To: douglas@*****.com
- Subject: Allow disable of {} blocks part 2
- I get dozens of feature requests for my apps, but I usually ignore them until I hear the same thing 3 times or more.
- So I'd like to make an argument for jslint to not require blocks for single lines of if, for. Blocks for single lines is a qualitatively different issue than something like undefined variables or implied globals. While { } around blocks may increase readability and decrease errors, it has no actual effect on the interpreted representation of a script. Undefined and implied globals are real, actual issues that do affect a script's internal representation in memory.
- I would go as far as to say disallow undefined variables and show implied globals are jslint actually finding real errors, while { } and others are stylistic warnings. With jslint automatically giving up after a certain point, you're actually hiding errors in order to show more warnings.
- Please give us the ability to ignore style until we fix actual errors.
- Michael
- -----Original Message-----
- From: Douglas Crockford [mailto:douglas@*****.com]
- Sent: Monday, December 22, 2008 2:45 PM
- To: Michael Dayah
- Subject: Re: Allow disable of {} blocks part 2
- JSLint is a code quality tool. Many of the checks it is able to perform are dependent on the structural quality of the code.
- Why do you feel so strongly about defending weak coding practices?
- -----Original Message-----
- From: Michael Dayah [mailto:michael@*****.com]
- Sent: Monday, December 22, 2008 2:57 PM
- To: 'Douglas Crockford'
- Subject: RE: Allow disable of {} blocks part 2
- I don't think not putting { } around blocks is a good practice. We're in agreement there, but I don't really care that much either way about it.
- However, jslint has the features not just to check style, but also check for actual, tangible (as far as computers) errors. If you perform that function, you've gone beyond stylistic code quality. You're finding actual problems; things people do unintentionally (or intentionally) that cause a script's representation in memory to be different in a bad way. Would you not agree this is a different type of error than { } blocks?
- Your project has apparently gone beyond its original scope and is now reporting two different kinds of errors, one type being far more critical than the other type. Trying to lump these two types together as "code quality" is a deliberate oversimplification. I believe you have an obligation to weigh true errors more heavily and make changes that prevent style warnings from obscuring these errors.
- -----Original Message-----
- From: Douglas Crockford [mailto:douglas@*****.com]
- Sent: Monday, December 22, 2008 3:01 PM
- To: Michael Dayah
- Subject: Re: Allow disable of {} blocks part 2
- I wrote it for my own use. It helps me to write better programs.
- If that isn't your goal, then find another tool.
- -----Original Message-----
- From: Michael Dayah [mailto:michael@*****.com]
- Sent: Monday, December 22, 2008 3:10 PM
- To: 'Douglas Crockford'
- Subject: RE: Allow disable of {} blocks part 2
- My mistake. You may want to change your e-mail notice:
- "Please let me know if JSLint is useful for you. Is it too strict? Is there a check or a report that could speed up your debugging?
- douglas@crockford.com"
- It gives the impression that you want to hear constructive feedback and criticism.
- -----Original Message-----
- From: Douglas Crockford [mailto:douglas@*****.com]
- Sent: Monday, December 22, 2008 3:20 PM
- To: Michael Dayah
- Subject: Re: Allow disable of {} blocks part 2
- I'm sorry I hurt your feelings.
- -----Original Message-----
- From: Michael Dayah [mailto:michael@*****.com]
- Sent: Monday, December 22, 2008 3:22 PM
- To: 'Douglas Crockford'
- Subject: RE: Allow disable of {} blocks part 2
- I've reconsidered, and I believe my tone is not coming through clearly. I also offer a resource that tens of thousands use every day for free, and I also get e-mails where people feel entitled or owed that resource. I understand my e-mails may have sounded like this.
- The reason I'm writing with strong words and trying to make a strong argument is because I wish to influence your design decisions. The only way to do this is to argue strongly in measured terms with clear conclusions. It is your application and you are of course free to design it as you will, but I would also like the opportunity to present my own arguments about its direction without getting personal. I'm sorry if this came off as "change it to the way I like because I'm angry!"
- I, however, do continue to feel the argument is valid and believe it to have a strong backing, but I have nothing personal against you and still appreciate all the features jslint has that nothing else does.
- Apologies,
- Michael
- -----Original Message-----
- From: Douglas Crockford [mailto:douglas@*****.com]
- Sent: Monday, December 22, 2008 3:39 PM
- To: Michael Dayah
- Subject: Re: Allow disable of {} blocks part 2
- I appreciate your apologies.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement