Sujet : Re: Which code style do you prefer the most?
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.cDate : 01. Mar 2025, 21:32:59
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vpvqtt$ckvi$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 01.03.2025 17:32, David Brown wrote:
On 28/02/2025 22:08, Lawrence D'Oliveiro wrote:
On Fri, 28 Feb 2025 10:19:49 +0000, Richard Heathfield wrote:
>
value = really_quite_extremely_long_function_name(arg1,
arg2,
arg3,
arg4);
>
confection = prepare_carefully_according_to_detailed_recipe
(
/*pan =*/ flat,
/*line_with =*/ clarified_butter,
/*filling =*/ something_yummy,
/*cover_with =*/ lotsa_pastry,
/*bake_for =*/ 90 * MINUTES
);
I get the impression that you work alone.
My guess is that this form is just an informal syntax mimicking Perl's
function parameter passing as hash with the passed values associated
with the formal parameter names in the call. - You know; he's a Perl
fan. - Of course it's one thing if a language supports such parameter
passing mechanisms or if you just make it look like that but without
actually getting the (indeed neat) mechanism [that you have in Perl].
So this not only looks bad (in "C") but also doesn't work as desired.
In C++ we could use specific argument objects to support defaults and
any argument order, but in "C" it would probably get yet more clumsy
to support that.
Janis