I feel we should keep in line with the function calls. There are already way too many spaces as it is, and there is never a problem telling control structures apart - they are always followed by an indented block and most editors highlight them. I think if(), while(), foreach(), for() should all be without a space after keyword.
Tyler Romeo <tylerromeo <at> gmail.com> writes:
Yeah, this has gotten pretty frustrating, because sometimes even in the same function different styles are used. We need to stick with one. I'd recommend using the spacey version, because we use the non-spacey version for function calls and definitions, so at least IMO it's a good way to distinguish control structures from functions.
*--* *Tyler Romeo* Stevens Institute of Technology, Class of 2015 Major in Computer Science www.whizkidztech.com | tylerromeo <at> gmail.com
On Tue, Jan 22, 2013 at 2:07 PM, bawolff <bawolff+wn <at> gmail.com>
wrote:
On 2013-01-22 3:01 PM, "Brad Jorsch" <bjorsch <at> wikimedia.org> wrote:
Our coding conventions for PHP are currently ambivalent on whether we should write "if (" or "if(". It's probably time to pick one.
Discussion at
https://www.mediawiki.org/wiki/Manual_talk:Coding_conventions/PHP#Control_st... ures
Wikitech-l mailing list Wikitech-l <at> lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
For some reason I thought the spacy version was the convention. Guess
its
never really been specified.
Also wasn't the stuff about efFuncName that I see in the current coding convention doc reverted out a while back for not being a "real" (recommended) convention?
-bawolff _______________________________________________ Wikitech-l mailing list Wikitech-l <at> lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Hey,
I hereby admit defeat. My thread was clearly not the ultimate bikeshed.
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. --
Lmao. Honestly I don't care either way, and any attempt to make up reasons for one over the other is going to be insignificant. We just need to pick one and stick with it. If we can agree on one, I'll personally go through the entire codebase and change it.
*--* *Tyler Romeo* Stevens Institute of Technology, Class of 2015 Major in Computer Science www.whizkidztech.com | tylerromeo@gmail.com
On Tue, Jan 22, 2013 at 5:04 PM, Jeroen De Dauw jeroendedauw@gmail.comwrote:
Hey,
I hereby admit defeat. My thread was clearly not the ultimate bikeshed.
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. -- _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On 2013-01-22 6:05 PM, "Jeroen De Dauw" jeroendedauw@gmail.com wrote:
Hey,
I hereby admit defeat. My thread was clearly not the ultimate bikeshed.
Cheers
--
On this bikeshed, allowing both styles sounds perfectly acceptable to me.
-bawolff
wikitech-l@lists.wikimedia.org