Thread:Manual talk:Coding conventions/JavaScript/Whitespace conventions for control structures should match those for PHP/reply


 * Some operators require a space by syntax, others tolerate both (in the case of, both are allowed). In that case it comes down to convention and consistency.
 * Our JS code base is relatively new, therefore it doesn't make sense to start off with allowing arbitrary variations that are inconsistent in nature. Incorporating exceptions in the code conventions (the convention to separate all keywords by a space) might make sense for an established code base, but not for a new one.
 * What do you mean by "know your keywords"? Are you suggesting someone might not know what is an operator and what a function? Though I think one should know what is and isn't an operator, that's easily looked up if you don't know, and then there is editors that do the highlighting for you, and of course the whitespace convention to make it easy to detect. And to be fair, it is a reasonable expectation to know the basic operators in a language before writing in it, of course (, ,  ,  , ..).

As for discussion place, I think this talk page is as good as any.

Provided the following use cases for enforcing the "space after ":
 * Consistency in style (sometimes a space and sometimes not is inconsistent)
 * Consistency in syntax (some operators require it, some operators don't)
 * Simplicity in distinguishing operators/keywords from function invocations.

Can you respond with a few use cases for leaving it "differed" ?