The default code style configured by Alire requires using a space after the name of a function, procedure, or array and before the open parenthesis. For example:
X := Some_Function (A + Some_Array (B));
-- ^space ^space
I realize this is also widely used by AdaCore. However, I’ve never been a fan of this style, and I would normally write the code above without the spaces.
The Ada Quality and Style Guide is a little inconsistent on this issue. The text says that spaces should be placed on the outside of parentheses except not immediately after a function call. This suggests the code as I wrote it above is right. However, the examples in the style guide are wildly inconsistent on this point, sometimes even in the same example (and sometimes even only a couple of lines apart!). That should probably be fixed.
Also, some authors, notably John Barnes, do not use the space in the examples in his books.
I’m prepared to conform to a community style, even reformatting my existing code to do so, but I want to be sure there is a strong agreement within the community about it. My question is: to what extent do people use/expect those “extra” spaces?
Thanks!