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 connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <v78hoq$1rcuu$1@dont-email.me>
Deutsch   English   Français   Italiano  
<v78hoq$1rcuu$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!.POSTED!not-for-mail
From: Bart <bc@freeuk.com>
Newsgroups: comp.lang.c
Subject: =?UTF-8?Q?Re=3A_technology_discussion_=E2=86=92_does_the_world_need?=
 =?UTF-8?B?IGEgIm5ldyIgQyA/?=
Date: Wed, 17 Jul 2024 14:42:51 +0100
Organization: A noiseless patient Spider
Lines: 96
Message-ID: <v78hoq$1rcuu$1@dont-email.me>
References: <v66eci$2qeee$1@dont-email.me> <v6gl83$s72a$1@dont-email.me>
 <v6h8ao$ur1v$1@dont-email.me> <v6jhk3$1drd6$1@dont-email.me>
 <v6jiud$1dsjb$1@dont-email.me> <877cdur1z9.fsf@bsb.me.uk>
 <v6joi4$1epoj$1@dont-email.me> <871q42qy33.fsf@bsb.me.uk>
 <v6k6i0$1h4d3$1@dont-email.me> <87ed82p28y.fsf@bsb.me.uk>
 <v6m03l$1tf05$1@dont-email.me> <87r0c1nzjj.fsf@bsb.me.uk>
 <v6m716$1urj4$1@dont-email.me> <86ikxd8czu.fsf@linuxsc.com>
 <v6mggd$20g3f$1@dont-email.me> <20240710213910.00000afd@yahoo.com>
 <v6mm02$21cpb$1@dont-email.me> <865xtc87yo.fsf@linuxsc.com>
 <v6ol14$2fdrj$1@dont-email.me> <87msmnu5e3.fsf@nosuchdomain.example.com>
 <v6pdcf$2jijk$1@dont-email.me> <87frsfu0yp.fsf@nosuchdomain.example.com>
 <v6pfo3$2jijk$2@dont-email.me> <v6qgbt$2t6p7$1@dont-email.me>
 <v6r2im$30a9n$1@dont-email.me> <v6r807$317bp$1@dont-email.me>
 <v6rrok$34t3j$1@dont-email.me> <v6thtn$3hc2e$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 17 Jul 2024 15:42:51 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="bf2146295ce154b402888450fc1558ab";
	logging-data="1946590"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/yBQNbsknWEqVde2R4PMJe"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:jn8J+BuY1AlLMbzkut1yc8tjryM=
Content-Language: en-GB
In-Reply-To: <v6thtn$3hc2e$1@dont-email.me>
Bytes: 5807

On 13/07/2024 10:37, David Brown wrote:

> If you say stupid things, repeatedly,

> Start applying a bit of your intelligence (you say stupid things 
> sometimes, but I know you are far from stupid), and you'll find the 
> level of conversation going up.
> 
>> I made the tweak to see how hard it would be to detect value-arrays 
>> declared in parameter list (it was very easy), and what the 
>> consequences would be on existing code (significant).
> 
> No, the consequences are non-existent because no one uses your tool, and 
> no one will ever copy that change in other tools (of significance).

You are spectacularly missing the point. IT DOESN'T WHOSE TOOL IT IS. 
Somebody could have done the same exercise with gcc, and come to the 
same conclusion: too many programs use array parameters.


> 
>>
>> The example I posted showed a type (const char* x[]) where there was 
>> no advantage to having that value array notation. Using 'const char**' 
>> would be a more accurate description of the actual parameter type.
>>
> 
> You can write your code the way you want to write it - it will not 
> change the way anyone else writes their code.  It really is that simple. 
>   Why is this so difficult for you to understand?
> 
> Do you really suppose that if /you/ make "foo(char x[])" a syntax error 
> in /your/ compiler, it will have the slightest effect on how other 
> people write their C code?

What WOULD be the effect if a compiler did that? How would a particular 
codebase be affected?

You can just modify a compiler and try it, which is what I did. What 
difference does it make which compiler it is? You just have a blind, 
irrational hatred for anything I do.

Another way to do it is for someone to painstakingly go through every 
line of a codebase by hand, expanding macros and typedefs as needed, and 
checking whether any parameters declared top-level array types.

I think if you were given that job to do,  then applying my toy compiler 
wouldn't be so bad after all!

> Or on what other C compilers do?  Or on how 
> half a century of existing C code is written?
> 
> 
> Personally, I don't like that C allows something that /looks/ like 
> arrays can be passed to functions, but doesn't work that way.

gcc could conceivably have an option that detects and warns about that. 
Whoever is thinking about doing that might well do a test exactly like mine.

>  I don't 
> think I have ever written a function with an array-like parameter - I 
> use a pointer parameter if I mean a pointer, or have the array wrapped 
> in a struct if I want to pass an array by value.

So all /your/ code would still pass; great!

>  But I don't think my 
> opinions make a difference to C, and even if I were elected dictator of 
> C for a day, I don't think my opinions should count more than any one 
> else's - including those that like the way C works here

Half of the programming language you call "C" is defined by the way you 
invoke your compiler. So that already allows for myriad, slightly 
different dialects.

Somebody had to think up all those options, and they would have been 
influence by people's opinions. This is just one more, which I would 
happily have as a default.


> And I don't confuse my opinions or preferences with how C actually works 
> and how it is actually defined, and I certainly don't spread such 
> confusions and misunderstandings to others.

C does that well enough by itself. There are any number of behaviours 
where: (1) saying nothing and passing; (2) warning and passing; (3) 
reporting an error and failing are all perfectly valid.

You just choose which one you want, at least if using an equivocal 
compiler like gcc.

This is like taking an examination and being able to choose how strictly 
it should be marked! Yeah, I think I'll got a pass today...