coding standards – function name in column 0

My life seems to be a study in coding standards. I love coding standards. I like to try new ones every few days. (That sounds facetious, but seriously – the less I have to think about formatting, the more brainpower I have to think about algorithms. And coffee.)

One I’m particularly fond of is (in C mostly, but C++ kinda) making the function name start in column zero:

int
function_name(void *arg1, char arg2)
{
return 42;
}

It just allows for easy grep’ping if you’re consistent.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: