๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #1120

Re: .5 against 0.5f

#1120
From: Steven G. Kargl
Date: Thu, 29 Oct 2026 16:34
34 lines
3018 bytes
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 Versionย 6 AT&T UNIX.

So, it seems to be a preference of Ritchie.

-- 
steve
Technical Details
Message-ID: <11bvsj4$3g32k$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
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>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: "Steven G. Kargl" <sgk@REMOVEtroutmask.apl.washington.edu>
Newsgroups: comp.lang.c
Subject: Re: .5 against 0.5f
Date: Thu, 29 Oct 2026 16:34:44 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <11bvsj4$3g32k$1@dont-email.me>
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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 29 Oct 2026 16:34:45 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="3673172"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1908teGVswrBfleKPCZSmIv"; posting-host="6b9f3244a5c42f183047227ff05a2ad8"
User-Agent: Pan/0.164 (Kupiansk)
Cancel-Lock: sha1:Gf/4m27mGylJ9ln8bh1Rij2dNT4= sha256:L+zFVihhGW/zI/xP4eEkok5+989z4uqKYO0L6jKhdrc=
	sha1:LKuBRVONOlLOLC3J4yeqiGAxXd0= sha256:LCMTb1NXw6c+/tOCWh61ekHpl93PUNZvFBhjDzldJyI=