Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c
Subject: Re: .5 against 0.5f
Date: Thu, 29 Oct 2026 15:47:26 -0700
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <86o6cckttt.fsf@linuxsc.com>
References: <11bpvs7$1e6kc$2@dont-email.me> <11bqnvh$1np7s$1@dont-email.me> <11br5td$1to7l$1@dont-email.me> <11br792$1u7e5$1@dont-email.me> <11brgqf$21170$2@dont-email.me> <11brkco$21oj5$1@dont-email.me> <11bs4tj$26daj$1@dont-email.me> <11bs613$26knh$1@dont-email.me> <11bt7ff$2i0ag$1@dont-email.me> <11btm2a$2ojn1$2@kst.eternal-september.org> <11bttrp$2qvg6$1@dont-email.me> <11bu12l$2rgo2$4@kst.eternal-september.org> <11bu3kk$2svh8$1@dont-email.me> <868q3hmie0.fsf@linuxsc.com> <11bu8oi$2up7m$1@dont-email.me> <11bv4jd$37ch9$1@dont-email.me> <11bvsj4$3g32k$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Thu, 29 Oct 2026 22:47:29 +0000 (UTC)
Injection-Info: dont-email.me; logging-data="3974705"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18b9628uUzGR0HOizMwTu/6wkXj8eCibpg="; posting-host="a9c9791c9dd02c83b2c564a620bcf3c6"
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:t32QamfW4mqfjps5d1Mpb4qvf70= sha1:3S80vN3IzE0jV15mTdkc3UQ852o= sha256:CQO6lI6lzrsjn1V2uGopLhz5YM2C/keYNoePW2b4INg= sha1:6uLR/nZIJDZQR3do5bhm6uH71ws= sha256:Xt3ViRbaeNCCN0VeW46M/3ZbzAB/mxHbPrGczgI9MGQ=
Xref: csiph.com comp.lang.c:403804
"Steven G. Kargl" writes:
> On Thu, 29 Oct 2026 10:45:16 +0100, David Brown wrote:
>
>> Let me put it another way. What benefit do you think there is from
>> these parentheses? Why does the FreeBSD style guide recommend them?
>> I can see benefits in consistency of style once that usage has been
>> established, but why have them in the first place?
>
> As we all know, FreeBSD is derived from software developed by
> the CSRG at UC Berkeley during the 70's. FreeBSD adopted the
> Kernel Normal Format (KNF) from CSRG. You will need to contact
> a former member of CSRG such as Bostik, McKusick, Joy, Leffler,
> etc. and them why KNF requires ().
>
> Perhaps, the C compiler from 40 or so years ago required
> parentheses in a return statement. Or, just maybe, members of
> CSRG read K&R and noticed the authors of the book consistently
> use paretheses in their examples. Ah yes, let's look at
> the documentation:
>
> % man 9 style
>
> HISTORY
> This manual page was originally based on the src/admin/style/style
> file from the 4.4BSD-Lite2 release, with frequent updates to
> reflect the current practice and desire of the FreeBSD project.
> src/admin/style/style is a codification by the CSRG of the
> programming style of Ken Thompson and Dennis Ritchie in Version6
> AT&T UNIX.
>
> So, it seems to be a preference of Ritchie.
It may have been simply long-standing habit rather than preference.
In the early days of C parentheses around return expressions were
required, not optional. I've been programming in C long enough to
have been influenced by that requirement (and later learned to undo
it).