Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connectionsPath: ...!feeds.phibee-telecom.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bart
Newsgroups: comp.lang.c
Subject: Re: Named arguments in C
Date: Thu, 4 Jul 2024 14:39:36 +0100
Organization: A noiseless patient Spider
Lines: 33
Message-ID:
References:
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 04 Jul 2024 15:39:35 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="5c56d5054694e2a5b0004aafc5111799";
logging-data="2933131"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ukB2Zz42KjJ0OiSDw1y58"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:xa/ZePBR+kGvkFgHzhi8RuCj6uY=
In-Reply-To:
Content-Language: en-GB
Bytes: 2523
On 04/07/2024 14:37, Bonita Montero wrote:
> Am 04.07.2024 um 14:49 schrieb bart:
>> On 04/07/2024 12:12, Bonita Montero 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. 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.
>>>> You can sort of already do it in C by using designated initializers
>>>> and macros
>>>> #define foo(A, B, C, ...) do{\
>>>> stuct technical technical={\
>>>> var1=default1,\
>>>> var2=default2,\
>>>> var3=default3 __VA_OPT__(,)\
>>>> __VA_ARGS__\
>>>> }\
>>>> actual_foo(A, B, C, technical.var1, technical.var2,
>>>> technical.var3)\
>>>> }while(0)
>>>
>>> What an anquated language that this needs macros.
>>
>> How do you do it in C++?
>>
>
> With a inline-function that returns an auto to make the inner type
> accessible.
>
I meant, what do you have to do to get named arguments in C++?
Is it more of a nightmare than in C or less?