Re: [tuxdroid-user] Fwd: Re: PATCH: For new coding style
Status: Beta
Brought to you by:
ks156
From: Srikanta P. <sri...@gm...> - 2007-03-12 12:16:05
|
On 3/11/07, David Bourgeois <da...@ja...> wrote: > > Thanks Henrik, > > > Another point, functions seems to be declared that way: > > > > type > > my_function ( > > type arg1, > > type arg2, > > ) > > { > > // body > > } > > > > while another common way is > > > > type my_function (type arg1, type arg2) > > { > > // body > > } > > I prefer #2 here (actually, I prefer to have the opening brace on the > same line as well, but that's not too common, I think). I think the > best argument for #2 is that it helps grepping. If a function has > many arguments, one can always do > type func(type arg1, > type arg2, > ... > type argn) > { > > } > > Another + point for #2 way: In Vi, to reach the function beginning, one can just to [[. This works only when the { is on column 1. :-) |