thiemowmde added a subscriber: adrianheine.
thiemowmde added a comment.

Note that the code style we are messing around with here was intentionally 
created like that in November 2013. The team changed a lot since then and we 
may agree that this is reason enough to have this discussion.

This is what I would like to do:

1. If the relevant developers actually working on JavaScript code (this is 
Adrian, Jonas and me) agree, I'm all positive to change the rule for control 
structures to have an enforced space: `for ()`, `if ()`, `switch ()`, `while 
()`, also including `catch ()`.
2. A strong no to `function ()` with a space. This contradicts the reasoning 
behind this "space vs. no space" rule: function declarations and calls never 
have a space. In PHP `public function foo( $param )` does not have a space, 
calling `$this->foo( $param )` does not have a space, so why should `function( 
$param )` have a space? Same in JavaScript, `function foo( param )` does not 
have a space, calling `this.foo( param )` does not have a space, so why should 
`foo = function( param )` have a space?


TASK DETAIL
  https://phabricator.wikimedia.org/T110811

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Jonas, thiemowmde
Cc: adrianheine, JanZerebecki, Ricordisamoa, gerritbot, Lydia_Pintscher, 
Addshore, thiemowmde, Jonas, Aklapper, Wikidata-bugs, aude



_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to