Hello! On Thu, 2 Mar 2006, Garance A Drosehn wrote: >> following style(9) advise: >> >> Values in return statements should be enclosed in parentheses. >> >> What's the rationale of this? > > Let's say you are debugging a routine which has a dozen different > return statements. If they all have the form 'return (blah)', > then you can easily #define a return(x) macro which could print > out some debugging information before returning. Or maybe add > one extra check before returning, in order to catch where some > error-situation first showed up. (that check might need to > reference other variables inside the routine you are debugging, > in which case the check would have to be done in the routine > itself, and not in some calling routine). Thank you very much. That's actually explains what those extra ()'s are for. Maybe this even worth mentioning in style(9) in order to prevent questions like mine. > You asked for some rationale, and that is a rationale. It may > not even be the right rationale. The fact that I mentioned it > does not mean that I plan to join any debate about it. What is > in style(9) are recommendations which have *already* been agreed > upon. We're not going to re-open debate on those recommendations > every time some new person reads the man page. We cannot afford > the amount of time and energy which would be wasted. What I didn't expect is that my simple question will get such an emotional reply. I'm sorry if I've hurt someone, I just want to know more. Sincerely, Dmitry -- Atlantis ISP, System Administrator e-mail: dmitry_at_atlantis.dp.ua nic-hdl: LYNX-RIPEReceived on Thu Mar 02 2006 - 21:10:36 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:53 UTC