As you know, in the use of a space after the function name (before the subsequent bracket) there are two ways in all those languages in which after the function name there are brackets (for example, in C, in C ++, in PHP, in JavaScript ...).
The first way is to refrain from such use. The second way, on the contrary, is to steadily put a space after the name of the function and before the subsequent bracket.
Guided by considerations of saving space, most authors of styles and coding standards come to the idea of the correctness of the first of these paths. You can see this with the example of
PHP coding standards :
PEAR ([ 1 ], [
2 ]),
Zend ,
Symfony ,
CakePHP ,
DB Medialab ,
evolt.org ,
GForge , and nIx0iD own
standard -
all, all of them recommend to refrain from a space.
')
However, relatively recently, I saw on the Internet (not on Habrahabr, or on another similar site) a third way
to preach:
put a space after the function name (and before the next bracket)
only in the definition of this function, but
not put a space when calling a function. The author of this recipe guessed (and rightly so) that following this third way opens up the programmer with the opportunity to type in the search string
" Function name ( " with a space to immediately find the definition of the function in the source code, not wading through the thickets and the wilds of its calls.
Over time, I came to the conclusion that such a smart hack would always be useful when the IDE is not at hand, but there is a simple text search — or when the IDE is not intelligent enough to be able to find the
definition of the desired function. The extra space allows the programmer to achieve the desired without fail.
Alas, I came to this conclusion too late. Seeing this recipe for the first time, I let the question “How many gaps do you
need to install
?!”, An issue that seemed to me rather rhetorical and prohibitive,
to emerge from the lazy depths of the subconscious. Since then, I have ripened to see firsthand that this recipe actually saves a lot more time when searching than I would have to spend time on filling in the gaps in the function headers; therefore, saving on these spaces is no less false saving than saving on comments or than
documentary documentation (from the English “bukazoid documentation pattern”; in my translation, if you like, “conventional documentation,” according to the phrase Scherby, “the
cold kuzdra shteko it was bokra ... "). The problem is that while I was convinced of this, I completely forgot both the author and the source of the recipe.
Reader! Did he come across you?