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 <20250523132019.763@kylheku.com>
Deutsch   English   Français   Italiano  
<20250523132019.763@kylheku.com>

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

Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Kaz Kylheku <643-408-1753@kylheku.com>
Newsgroups: comp.lang.c
Subject: Re: encapsulating directory operations
Date: Fri, 23 May 2025 20:27:37 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <20250523132019.763@kylheku.com>
References: <100h650$23r5l$1@dont-email.me> <20250520065158.709@kylheku.com>
 <100i2la$292le$1@dont-email.me> <87a5770xjw.fsf@nosuchdomain.example.com>
 <100j09o$2f04b$1@dont-email.me> <87tt5ezx9y.fsf@nosuchdomain.example.com>
 <100j4t3$2foah$1@dont-email.me> <87ldqqzfj0.fsf@nosuchdomain.example.com>
 <100kak8$2q0s6$1@dont-email.me> <87a575zvmb.fsf@nosuchdomain.example.com>
 <100o3sc$3ll6t$1@dont-email.me> <87bjrkxonr.fsf@nosuchdomain.example.com>
 <b7fb8fc41d43807641e673e1ca1d3baf69f5766f@i2pn2.org>
 <87iklrtcys.fsf@nosuchdomain.example.com>
Injection-Date: Fri, 23 May 2025 22:27:37 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="cb63dad964590d203f250b2756a461e1";
	logging-data="280564"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/QzTwqpcn1hzRPS4MCmlA+k1h/GOW9BBY="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:p7M+YlMt4ZU7vcNBMQf92NJTnpg=

On 2025-05-23, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
> Richard Harnden <richard.harnden@gmail.invalid> writes:
>> On 22/05/2025 23:32, Keith Thompson wrote:
>>> "Paul Edwards" <mutazilah@gmail.com> writes:
>>>> [...]
>>> In one of your library's headers:
>>> extern const char ESCAPE;
>>> In the corresponding *.c file:
>>> const char ESCAPE = ('z' - 'a' == 25 ? '\x1b' : '\x27');
>>> Change the name if you prefer.
>>
>> Wouldn't that be a reserved identifier?
>
> Yes, it would.  Good catch.
>
> (Identifiers starting with E followed by either a digit or an uppercase
> letter are reserved; they could be defined as macros in <errno.h>.)

But C99 introduced, for instance "double round(double);".

If you had programs which used that as a file scope identifier
where <float.h> was included, or an external name, you had a clash.

It wasn't previously announced that common mathematical words are
reserved, or that identifiers starting with "r" are reserved.

Basically, the concept of reserved spaces is not worth a damn, because
ISO C doesn't actually confine itself to them when naming new entities,
and so no matter what name you choose, you could have a clash in the
future.

There is no way to estimate whether some specific name starting with E
is more or less likely to experience a clash than any other hame;
i.e. we cannot say with certainty that ESCAPE is more likely to
clash than MY_ESCAPE.

Ironically, one way to protect yourself, at least as a solo developer
working on a greenfield projecg with no third party cruft, is to use
short identifiers like extern const char ES. Because no standard or
major API is going to use short names. Everyone uses long-ish names
because it's insane to do otherwise. And that gives YOU the room
to do the insane thing. :)

-- 
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca