Deutsch   English   Français   Italiano  
<20240704150249.00004c4d@yahoo.com>

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

Path: ...!feeds.phibee-telecom.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Michael S <already5chosen@yahoo.com>
Newsgroups: comp.lang.c
Subject: Re: Named arguments in C
Date: Thu, 4 Jul 2024 15:02:49 +0300
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <20240704150249.00004c4d@yahoo.com>
References: <utgjh0$21nsq$2@dont-email.me>
	<uth66l$266da$1@dont-email.me>
	<uti83u$2ed01$4@dont-email.me>
	<utjhfn$2r0cr$1@dont-email.me>
	<v61bbh$1n9ij$1@dont-email.me>
	<v6602d$2o5t2$1@raubtier-asyl.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Injection-Date: Thu, 04 Jul 2024 14:02:54 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="7804a1c71f976687471970b04c4d3d2f";
	logging-data="2884553"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+fJj6tkEECWbKGq6thmOzubaW+2OF35DI="
Cancel-Lock: sha1:Hrt2ggVnV1Ui54UhP1rFt8o/NSI=
X-Newsreader: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-w64-mingw32)
Bytes: 2847

On Thu, 4 Jul 2024 13:12:18 +0200
Bonita Montero <Bonita.Montero@gmail.com> wrote:

> Am 02.07.2024 um 18:53 schrieb Ivan Farlenkov:
> >> I am a fan of being able to name parameters in languages that
> >> allow it. I am quite confident that this will never come to C.=A0 It
> >> /might/ make it into C++, but as people have been writing
> >> proposals to do so for 20 years at least, I am not holding my
> >> breath. =20
> > You can sort of already do it in C by using designated initializers
> > and macros
> > #define foo(A, B, C, ...) do{\
> >  =A0=A0=A0=A0stuct technical technical=3D{\
> >  =A0=A0=A0=A0=A0=A0=A0 var1=3Ddefault1,\
> >  =A0=A0=A0=A0=A0=A0=A0 var2=3Ddefault2,\
> >  =A0=A0=A0=A0=A0=A0=A0 var3=3Ddefault3 __VA_OPT__(,)\
> >  =A0=A0=A0=A0=A0=A0=A0 __VA_ARGS__\
> >  =A0=A0=A0=A0}\
> >  =A0=A0=A0=A0actual_foo(A, B, C, technical.var1, technical.var2,
> > technical.var3)\ }while(0) =20
>=20
> What an anquated language that this needs macros.
>=20

I don't suppose that somebody likes this macro stuff or takes it
seriously. It's just a PoC.
But at least we can imagine how named call arguments can be added to
"antiquated language" if The Committee decides to do so. It would not
be easy, but clash with other language features is avoidable.
Not so with "modern language" that your like. For "modern language" the
clash with other [mis]features will be unavoidable and fatal.

[O.T.]
If I am not mistaken "modern language" is so twisted that it can't even
have proper designated initializers for struct (proper =3D arbitrary
order). I don't know what is the reason for that, but the reason exists.