🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #1122

Re: .5 against 0.5f

#1122
From: Janis Papanagnou
Date: Thu, 29 Oct 2026 16:58
49 lines
3401 bytes
On 2026-10-29 02:50, Steven G. Kargl wrote:
> On Wed, 28 Oct 2026 17:59:19 -0700, Tim Rentsch wrote:
>> "Steven G. Kargl" <sgk@REMOVEtroutmask.apl.washington.edu> writes:
>>> On Wed, 28 Oct 2026 16:39:00 -0700, Keith Thompson wrote:
>>>
>>>> [...], and you don't need parentheses on the
>>>> return statement, particularly if you dislike fluff.)
>>>
>>> [...]
>>>
>>> Parentheses is a habit from BSD kernel source file style guide.
>>
>> Now is a good time to start unlearning that habit.
> 
> Why?  What harm do the parentheses cause?
> 
> Unlearning is not likely to happen. [...]

I understand that long fostered habits are hard to change, so I
certainly wouldn't criticize that; and especially since they do
no harm as you say. (They're only "unnecessary fluff".)

>>> [BSD style]
>>> % man 9 style
>>> ...
>>>       Values in return statements should be enclosed in parentheses.
>>> [...]
>> [...]
> 
> Do you ignore the style requirements of all the projects
> that you may have worked on, and simply use whatever
> your personal preferences are?

Following some projects' style requirements is certainly the most
important argument here!


Myself I started with "C" using parenthesis - and I wondered why!
The reason (in my case) was obviously that this had been the style
that was regularly used in the _K&R book_ (where I learned the "C"
language from).

But at some point (meanwhile decades ago) when I got aware that the
parenthesis are unnecessary I immediately switched to the (IMO)
much cleaner form without the spurious parenthesis. (There's already
far too many [mandatory] parenthesis in the language, to my taste.)

Janis
Technical Details
Message-ID: <11bvtvu$2t865$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>

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: Janis Papanagnou <janis_papanagnou+ng@hotmail.com>
Newsgroups: comp.lang.c
Subject: Re: .5 against 0.5f
Date: Thu, 29 Oct 2026 17:58:38 +0100
Organization: A noiseless patient Spider
Lines: 49
Message-ID: <11bvtvu$2t865$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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 29 Oct 2026 16:58:39 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="3055813"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+fYUiyRqhKNOSPwY+8JBCf"; posting-host="5e472b3107e6c2ac767abee4ba3b623e"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:DbhQrj8+f0MtDB+a/klFl1s0Phg= sha256:bLyTuQkJQAlAFD/sw8eMOenQW+t6lJx7DFbVMas0vaE=
	sha1:FYqR4XE0wLss4VZugFXkNBgTZrc= sha256:VWO6ZwMQ4+TvNV30T1jiJsJv1/ng3+0HcZQMHj4z8cI=
In-Reply-To: <11bu8oi$2up7m$1@dont-email.me>
Content-Language: en-US