[RFC|Merged] Javascript Coding Style
Re: [RFC] Javascript Coding Style
Anyone going to make a pull request for the coding guidelines to add a section about javascript with what is proposed here?
- callumacrae
- Former Team Member
- Posts: 1046
- Joined: Tue Apr 27, 2010 9:37 am
- Location: England
- Contact:
Re: [RFC] Javascript Coding Style
Doing it now.naderman wrote:Anyone going to make a pull request for the coding guidelines to add a section about javascript with what is proposed here?
Re: [RFC] Javascript Coding Style
@callum, I'd like to work on writing the guidelines too, enlighten me with the source :p
There is a text here !
- Fyorl
- Google Summer of Code Student
- Posts: 27
- Joined: Mon Apr 02, 2012 4:51 am
- Location: UK
- Contact:
[RFC] Coding guidelines - JavaScript braces
I'd like to revisit the discussion on curly braces in Javascript since it didn't seem to get resolved in the previous pages. It was already established that braces on their own line looked ugly for anonymous functions and also caused bugs/errors when attempting to return an object. In this case, it feels inconsistent to have one style of curly braces for objects and lambdas but another for named functions and block statements. Would it not be simpler to just say that, in Javascript files, the opening curly brace should be on the same line?
Re: [RFC|Accepted] Coding Guideline Modifications
I think we really should stop adding more things to this RFC and just start new ones whenever new things come up. Does someone feel like splitting up recent posts into separate discussions?
Re: [RFC|Accepted] Coding Guideline Modifications
I do.naderman wrote:Does someone feel like splitting up recent posts into separate discussions?
- callumacrae
- Former Team Member
- Posts: 1046
- Joined: Tue Apr 27, 2010 9:37 am
- Location: England
- Contact:
Re: [RFC|Accepted] Coding Guideline Modifications
That's what was decided, and I have an open pull request for it here: https://github.com/phpbb/phpbb3/pull/779Fyorl wrote:I'd like to revisit the discussion on curly braces in Javascript since it didn't seem to get resolved in the previous pages. It was already established that braces on their own line looked ugly for anonymous functions and also caused bugs/errors when attempting to return an object. In this case, it feels inconsistent to have one style of curly braces for objects and lambdas but another for named functions and block statements. Would it not be simpler to just say that, in Javascript files, the opening curly brace should be on the same line?
Done (ish).naderman wrote:I think we really should stop adding more things to this RFC and just start new ones whenever new things come up. Does someone feel like splitting up recent posts into separate discussions?