Ricordisamoa added a comment.
In https://phabricator.wikimedia.org/T110811#1606110, @thiemowmde wrote:
> 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?
`function( param )` could be mistaken for a call to a function named "function".
MediaWiki core uses "function" + " " + function name + "(" ecc. and the name of
an anonymous function is obviously empty. Also in PHP, because I can find much
more occurrences of "function (" than "function(".
TASK DETAIL
https://phabricator.wikimedia.org/T110811
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Jonas, Ricordisamoa
Cc: adrianheine, JanZerebecki, Ricordisamoa, gerritbot, Lydia_Pintscher,
Addshore, thiemowmde, Jonas, Aklapper, Wikidata-bugs, aude
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs