phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

[RFC|Merged] Javascript Coding Style

These requests for comments have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.

Re: [RFC] Javascript Coding Style

Postby naderman » Sun Apr 29, 2012 12:48 pm

Anyone going to make a pull request for the coding guidelines to add a section about javascript with what is proposed here?
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1650
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Re: [RFC] Javascript Coding Style

Postby callumacrae » Sun Apr 29, 2012 5:59 pm

naderman wrote:Anyone going to make a pull request for the coding guidelines to add a section about javascript with what is proposed here?

Doing it now.
"In JavaScript, there is a beautiful, elegant, highly expressive language that is buried under a steaming pile of good intentions and blunders"
—Douglas Crockford

View my MOD, phpBB Mobile
User avatar
callumacrae
Website Team
Website Team
 
Posts: 883
Joined: Tue Apr 27, 2010 9:37 am
Location: England

Re: [RFC] Javascript Coding Style

Postby _hsr » Fri May 04, 2012 11:43 am

@callum, I'd like to work on writing the guidelines too, enlighten me with the source :p
There is a text here !
_hsr
Registered User
 
Posts: 42
Joined: Mon Mar 26, 2012 7:06 am

[RFC] Coding guidelines - JavaScript braces

Postby Fyorl » Sun Jun 17, 2012 10:30 pm

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?
User avatar
Fyorl
Google Summer of Code Student
 
Posts: 27
Joined: Mon Apr 02, 2012 4:51 am
Location: UK

Re: [RFC|Accepted] Coding Guideline Modifications

Postby naderman » Sun Jun 17, 2012 11:01 pm

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?
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1650
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Re: [RFC|Accepted] Coding Guideline Modifications

Postby brunoais » Mon Jun 18, 2012 6:50 am

naderman wrote:Does someone feel like splitting up recent posts into separate discussions?

I do.
brunoais
Registered User
 
Posts: 627
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC|Accepted] Coding Guideline Modifications

Postby callumacrae » Mon Jun 18, 2012 7:15 am

Fyorl 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?

That's what was decided, and I have an open pull request for it here: https://github.com/phpbb/phpbb3/pull/779

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?

Done (ish).
"In JavaScript, there is a beautiful, elegant, highly expressive language that is buried under a steaming pile of good intentions and blunders"
—Douglas Crockford

View my MOD, phpBB Mobile
User avatar
callumacrae
Website Team
Website Team
 
Posts: 883
Joined: Tue Apr 27, 2010 9:37 am
Location: England

Re: [RFC|Merged] Javascript Coding Style

Postby naderman » Mon Jun 18, 2012 10:19 am

The PR has been merged.
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1650
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Previous

Return to [3.1/Ascraeus] Merged RFCs

Who is online

Users browsing this forum: Exabot [Bot] and 9 guests