Deutsch English Français Italiano |
<vq1fj3$oll9$1@dont-email.me> 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: bart <bc@freeuk.com> Newsgroups: comp.lang.c Subject: Re: Which code style do you prefer the most? Date: Sun, 2 Mar 2025 11:31:48 +0000 Organization: A noiseless patient Spider Lines: 26 Message-ID: <vq1fj3$oll9$1@dont-email.me> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 02 Mar 2025 12:31:47 +0100 (CET) Injection-Info: dont-email.me; posting-host="14c3d5cad90d090968edda894fc8ea67"; logging-data="808617"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+SpzMBWXqJ4SbCVfc8XD9a" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:u6EkRN5Spt178m4J39dz3n5DUwY= In-Reply-To: <87o6ykw7f9.fsf@nosuchdomain.example.com> Content-Language: en-GB Bytes: 2623 On 02/03/2025 01:24, Keith Thompson wrote: > Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes: >> On 01.03.2025 23:20, Lawrence D'Oliveiro wrote: >>> On Sat, 1 Mar 2025 21:32:59 +0100, Janis Papanagnou wrote: >>>> My guess is that this form is just an informal syntax mimicking Perl's >>>> function parameter passing ... >>> >>> The idea of passing arguments by keyword predates Perl. >> >> That wouldn't surprise me. - I know it from Perl. - Which other >> (earlier) languages do you have in mind? - What's its origin? > > For example, it exists in Ada since 1983. The following are all > equivalent, given that Foo takes integer arguments Arg1 and Arg2: > > Foo(Arg1 => 10, Arg2 => 20); > Foo(Arg2 => 20, Arg1 => 10); > Foo(10, Arg2 => 20); > Foo(10, 20); > > The syntax is IMHO much nicer than using /*...*/ comments in C. Does it have optional arguments with default values? IMO keyword arguments are much less useful without that feature/