Deutsch English Français Italiano |
<20240313172324.87@kylheku.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!2.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Kaz Kylheku <433-929-6894@kylheku.com> Newsgroups: comp.lang.c Subject: Re: Word For Today: =?UTF-8?Q?=E2=80=9CUglification=E2=80=9D?= Date: Thu, 14 Mar 2024 00:40:31 -0000 (UTC) Organization: A noiseless patient Spider Lines: 42 Message-ID: <20240313172324.87@kylheku.com> References: <uso6or$3t3jn$3@dont-email.me> <usopec$4eob$1@dont-email.me> <usort1$4t2r$1@dont-email.me> <20240312003531.349@kylheku.com> <wwvwmq7x4ex.fsf@LkoBDZeT.terraraq.uk> <usqnji$i40m$2@dont-email.me> <871q8f81wo.fsf@nosuchdomain.example.com> <wwvcyrysdyl.fsf@LkoBDZeT.terraraq.uk> <87jzm66uiz.fsf@nosuchdomain.example.com> <ust74s$15mv5$3@dont-email.me> <yQpIN.107778$SyNd.20359@fx33.iad> <ustaiu$16ghu$2@dont-email.me> <878r2l68bo.fsf@nosuchdomain.example.com> Injection-Date: Thu, 14 Mar 2024 00:40:31 -0000 (UTC) Injection-Info: dont-email.me; posting-host="5144a5b70d2242e56a2fa01db8244180"; logging-data="1308624"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+/VU4Wft0H9dC6rcW6MvqgJoeaxXoz6p4=" User-Agent: slrn/pre1.0.4-9 (Linux) Cancel-Lock: sha1:bX3FD2/Dq88wa38gAuKWc22mtOk= Bytes: 3417 On 2024-03-13, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote: > Lawrence D'Oliveiro <ldo@nz.invalid> writes: >> On Wed, 13 Mar 2024 22:33:02 GMT, Scott Lurndal wrote: >>> Third party libraries are allowed to use any mechanism they like to >>> minimize name conflicts other than prefixing with two underscores. >> >> But there is no other such mechanism available. > > Are you aware that working third party libraries exist, and name > collisions are fairly rare? How do you think that's possible? It's possible because firstly, even if there are collisions latent in the library mixture, not all libraries are used together in one application. E.g. in an OS distro installation there might be a thousand libraries, but no application uses all thousand. Secondly, even if two libraries are used in the same application, where those libraries have a header-file-level clash, the clash only occurs if their headers are included in the same translation unit in that program. Thirdly, mere linkage of two libraries into the same program can only cause a clash if it involves an external name. Fourth, even if two libraries have a clashing external name, I think that under certain dynamic linking paradigms, this is only a problem if that name is used. If the same name refers to multiple entities, there is an ambiguity, but if the program doesn't use that name, then the ambiguity doesn't matter. Fifth, if we are talking specifically about names used by macros for naming local symbols inserted into the program, libraries not in the C implementation in fact can get away with using the __ space. If these identifiers don't land on a compiler keyword, there is no actual problem. Now a third party library could choose such a name inside its macro such that the C library has also used the same name inside its macro. But for that to cause a clash, the macros have to be nested together. -- TXR Programming Language: http://nongnu.org/txr Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal Mastodon: @Kazinator@mstdn.ca