Deutsch   English   Français   Italiano  
<vtdmt5$g074$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: David Brown <david.brown@hesbynett.no>
Newsgroups: comp.lang.c
Subject: Re: do { quit; } else { }
Date: Sat, 12 Apr 2025 14:39:00 +0200
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <vtdmt5$g074$1@dont-email.me>
References: <vspbjh$8dvd$1@dont-email.me> <vt31m5$2513i$1@dont-email.me>
 <vt3d4g$2djqe$1@dont-email.me> <vt3iqh$2ka99$1@dont-email.me>
 <vt5fed$ccri$1@dont-email.me> <vt5js2$g1t7$1@dont-email.me>
 <20250409142303.00004645@yahoo.com> <87ikndqabc.fsf@nosuchdomain.example.com>
 <20250410115501.000037a5@yahoo.com> <vt8ei8$2vn84$1@dont-email.me>
 <20250410080629.532@kylheku.com> <vt94q5$3jjod$1@dont-email.me>
 <vt9628$3hhr8$3@dont-email.me> <vtammh$174ev$1@dont-email.me>
 <vtavn9$1dp7m$3@dont-email.me> <vtb8nv$1plb2$2@dont-email.me>
 <vtba81$1qfbm$1@dont-email.me> <vtbc6o$1te2o$1@dont-email.me>
 <vtbhjv$24api$1@dont-email.me> <vtbn2k$293r1$1@dont-email.me>
 <vtc19j$2kqlj$1@dont-email.me> <87a58mqt2o.fsf@nosuchdomain.example.com>
 <vtc7mp$2q5hr$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 12 Apr 2025 14:39:02 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="ba46ccd2f72040b3ad67511223a21cf7";
	logging-data="524516"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18CFuch1Hot1jypjw5RtxBHPp90DFhUuvc="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Bl+/V8LVtzuu2KoVgbxtRcU+Xco=
Content-Language: en-GB
In-Reply-To: <vtc7mp$2q5hr$1@dont-email.me>
Bytes: 3057

On 12/04/2025 01:13, bart wrote:
> On 11/04/2025 22:36, Keith Thompson wrote:
>> bart <bc@freeuk.com> writes:
>> [...]
>>> Rubbish. Everyone finds C declaration syntax a nightmare.
>>
>> Rubbish.  I find C declaration syntax annoying, not a "nightmare".
>>
> 
> Annoying would be having to get letter case or punctuation just right.
> 
> But C typepecs can go far beyond it. I can just about do arrays of 
> pointers, or pointers to arrays. Anything more complicated is pretty 
> much trial and error.
> 
> In an example in my post which I then deleted (DB will just ignore 
> examples), I wanted to create an array of 10 pointers to functions that 
> take an int and return an int.

If only C had a way to make that simple and clear.  Oh, wait - it does.

	typedef int (*FIntInt)(int);

	FIntInt funcs[10];

If a C programmer - such as yourself - is foolish enough to reject parts 
of the language designed to make coding simpler, safer, clearer and more 
portable, then I can see how your self-imposed restrictions make your 
coding harder.  But the fault lies in the poor use of the language, not 
the language.

(Typically you would give the function pointer type a name appropriate 
to its use rather than based on the parameter and return types - things 
like "keypress_event".)