Hacker News new | ask | show | jobs
by shortstuffsushi 3158 days ago
I'm seeing in the source that the author prefers

type

methodName(args...)

Is this a common C-ism? I'm not familiar with this code style.

2 comments

GNU style is mostly about the funny and ugly indentation of braces.

Return type on separate line is shared by many other coding styles.

Sure. It’s an illustrative example that it’s a common C style.
It is. It allows to search for function declarations with the regex '^[^( ]+[(]' (or similar) -- while more common in the past, many have adopted it and keep using it.

Personally I've come to find it nice to read, particularly when you're returning complex, long types.