-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Agree on code style and conventions for JavaScript #206
Comments
Discussed on the call. All agreed:
--nicholasbs |
I've begun documenting this and a few other code conventions which are already being used here: DevelopersGuide#Codestyle (thanks to Frank for writing up the additional notes). --nicholasbs |
(In [705]) Remove enter/exit function log statements (updates #206) --nicholasbs |
(In [707]) Remove console output (updates #206) --nicholasbs |
I believe we've decided that we were going to start making the style changes piecemeal to old code as we work with it, and start using the new style for new code. Correct me if I'm wrong here. Do we plan on removing the higher level exceptions in one shot? That seems less risky than changing all of the style at once. --rmarianski |
Yes, that sounds right to me: New code should use the new conventions, and old code should be updated as it's worked on. Re: removing the high-level catches, I'm +1 to doing it all at once. I don't think there's a lot of risk in doing that and it should be pretty quick. Sound good? --nicholasbs |
(In [757]) Remove high-level try-catch blocks (and update associated code to new style conventions); add lots of missing semicolons; remove trailing commas; remove cruft (updates #206) --nicholasbs |
I've just gone through and made a number of updates. Specifically:
From my testing, I don't believe these changes reveal any new errors (e.g., exceptions that were previously being silently caught and discarded). If this turns out to be wrong, I think we should fix them on a case by case basis and, if we do need to silently discard exceptions, make sure to document why (there are already several cases of this in the code and I left all of them as-is). I'm closing as fixed for now. Feel free to reopen if necessary. --nicholasbs |
We did this for Java code in #24 and I think we should do the same for JavaScript.
I like the code conventions that Crockford gives: http://javascript.crockford.com/code.html
Also, there are two patterns in the code that I'd like to discuss changing:
The text was updated successfully, but these errors were encountered: