Re: style(9) question

From: Dmitry Pryanishnikov <dmitry_at_atlantis.dp.ua>
Date: Thu, 2 Mar 2006 20:11:50 +0200 (EET)
Hello!

On Thu, 2 Mar 2006, Robert Watson wrote:
>> 	Values in return statements should be enclosed in parentheses.
>> 
>> What's the rationale of this? From time to time I see small commits just 
>> changing "return foo;" -> "return (foo);". I think the first form is quite 
>> natural and not ambiguous. Shouldn't we remove this advise from style(9)?
>
> Regarding the contents of style(9) -- generally, we try hard not to change 
> the style guide, as style proves to be a rather contentious topic, as it is 
> typically guided much more by opinion and taste than function.  Often, 
> ambiguities in the style guide are resolved by looking at what "most" cases 
> in the kernel tree currently do, then documenting that as the right way to do 
> it. I can't really think of a good reason for return (foo) over return foo, 
> but changing it will just make a bunch of code that previously conformed to 
> the style guide cease to do so, which probably doesn't really improve matters 
> :-).

  No, I don't propose to recommend "return foo;" over "return (foo);". But
how about removing this advise completely, making those forms equally
conformant?


Sincerely, Dmitry
-- 
Atlantis ISP, System Administrator
e-mail:  dmitry_at_atlantis.dp.ua
nic-hdl: LYNX-RIPE
Received on Thu Mar 02 2006 - 17:12:04 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:53 UTC