Deutsch   English   Français   Italiano  
<87frjwvy44.fsf@nosuchdomain.example.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: Which code style do you prefer the most?
Date: Sat, 01 Mar 2025 20:46:03 -0800
Organization: None to speak of
Lines: 25
Message-ID: <87frjwvy44.fsf@nosuchdomain.example.com>
References: <vpkmq0$21php$1@dont-email.me> <vpl62m$250af$1@dont-email.me>
	<87frk10w51.fsf@onesoftnet.eu.org> <vpn8vs$2jmv1$1@dont-email.me>
	<vpn92i$86q$1@reader1.panix.com> <vpodnf$2q6ak$4@dont-email.me>
	<vpovd0$30d00$1@dont-email.me> <vpp011$30evb$1@dont-email.me>
	<vpp8ag$31ooi$1@dont-email.me> <vppaeq$323aa$1@dont-email.me>
	<vprpss$3ipmu$1@dont-email.me> <vprtlj$3jdn5$1@dont-email.me>
	<vprv75$3jmqu$1@dont-email.me> <vps2k5$3k722$1@dont-email.me>
	<vpt8ju$3r2n0$6@dont-email.me> <vpvcrm$9uaj$2@dont-email.me>
	<vpvqtt$ckvi$1@dont-email.me> <vq017i$dkuj$2@dont-email.me>
	<vq02is$duht$1@dont-email.me>
	<87o6ykw7f9.fsf@nosuchdomain.example.com>
	<vq0giu$g1o3$4@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Sun, 02 Mar 2025 05:46:11 +0100 (CET)
Injection-Info: dont-email.me; posting-host="13a3d2da3aba773b995845e3aec0eb86";
	logging-data="687002"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+1HpANh5JfnYOD2wO6HN0x"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:69RJD0+PCBFQqinFMixkEbmpR8s=
	sha1:2HYgCVFEMLuaSG3uH/1DnamWoxs=
Bytes: 2525

Lawrence D'Oliveiro <ldo@nz.invalid> writes:
> On Sat, 01 Mar 2025 17:24:58 -0800, Keith Thompson wrote:
>> If I wanted to annotate arguments with parameter names, I'd probably use
>> aligned // comments with the name at the end of the line:
>> 
>>     confection = prepare_carefully_according_to_detailed_recipe(
>>         flat,             // pan
>>         clarified_butter, // line_with
>>         something_yummy,  // filling
>>         lotsa_pastry,     // cover_with
>>         90 * MINUTES      // bake_for
>>       );
>
> Then they end up the wrong way round.

What's "wrong" about it?

Sure, I'd prefer to have the parameter name first followed by the
argument, but I'm not willing to uglify the code with /*...*/
comments to achieve that.  And 99% of the time I don't bother
anyway.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */