Space between procedure name and param list in declaration


#1

I suggest to modify the style guide with putting a space between the procedure name and its parameter-list. Only in the declaration.

My reasons:

A space visually separates the function name, which is important, becasue it is the most important part of a procedure, which is a big code-portion.

This would differ from procedure invokation, which I consider an advantage.

1 extra space is neglectible amount of space-waste.


#2

Where does this come from? I haven’t seen it before in any of C, C++, Java, Python.

Unless this convention has some spread, I don’t think we should use it as the official style.


#3

I do not know how widespread it is. It is just my own initiative. I guess it is rarely used.


#4

The only project I know that uses this style is the LibGDX Java Project, look at any of the files in the repo for an example.

I dont think it hurts or benefits readability especially, so I will stick with the principle of least surprise and go with the de facto standard of no space.

-1 to this proposal, but thanks for the discussion :slight_smile:


#5

-1, I prefer the existing convention.


#6

It’s not a syntax error as far as I know…


#7

Huh. I guess it isn’t. The parser is smarter than I thought it would be.

I still prefer the other way though, mostly because of convention.