| Deutsch English Français Italiano |
|
<102cjj6$254om$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> Newsgroups: comp.lang.c Subject: Re: encapsulating directory operations Date: Wed, 11 Jun 2025 11:57:41 -0700 Organization: A noiseless patient Spider Lines: 39 Message-ID: <102cjj6$254om$1@dont-email.me> 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> <864ixavbs4.fsf@linuxsc.com> <87plfys9a5.fsf@nosuchdomain.example.com> <86bjqvr3u5.fsf@linuxsc.com> <878qlzibco.fsf@nosuchdomain.example.com> <20250610142356.296@kylheku.com> <874iwni6zb.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 11 Jun 2025 20:57:43 +0200 (CEST) Injection-Info: dont-email.me; posting-host="c426ef9b1b7dc16ddf2b60193e6c9b36"; logging-data="2265878"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+jyTSOQYxtkTxWaHqJUpm0cKec41SueIs=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:lAsxCQwNiso6knq/2PgzhtHGpkk= In-Reply-To: <874iwni6zb.fsf@nosuchdomain.example.com> Content-Language: en-US On 6/10/2025 3:09 PM, Keith Thompson wrote: > Kaz Kylheku <643-408-1753@kylheku.com> writes: >> On 2025-06-10, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote: >>> I find the reservation of potential errno macro names annoying. >> >> If the standard contained /no/ statements about what a given header >> file may reserve, then /any/ identifier whatsoever would be a potential >> clash. >> >> The errno reservation is kind of good because implementors often extend >> the set of errno constants. POSIX has a lot more of them than ISO C, and >> there are some vendor-specific ones. >> >> Anyway, you can safely ignore the reservation theatre, and just >> deal with clashes that happen, when they happen. (If you're lucky, >> that could just be never). > > You can do that, but a new clash could happen when your code is > compiled on a system that defines an errno macro that you haven't > seen before. > >> Anyway, ISO C, POSIX and vendors have historically introduced new >> identifiers in spaces that were not previously declared as reserved. >> If you're ever hit by that, you will feel like a completel sucker if >> you've religiously adhered to namespaces from your end. > > Yes, that can happen, but no, I won't feel like a complete sucker. > > If I define my own strfoo() function and a new edition of the standard > defines strfoo() in <string.h>, the clash is my fault,and I could have > avoided it by defining str_foo(). > > Nothing can prevent all possible name clashes, but I like to follow the > rules in the standard that let me prevent some of them. > Wrt to prepending to artificially create a namespace in C, ct, ala ct_*_*_* is fine with me. For your new addition how about a keith_thompson_*_*_* for your namespace? Or even a kt_* ? ;^)