Sujet : Re: Word For Today: “Uglification”
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 12. Mar 2024, 23:21:39
Autres entêtes
Organisation : None to speak of
Message-ID : <87h6hb851o.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Lawrence D'Oliveiro <
ldo@nz.invalid> writes:
On Tue, 12 Mar 2024 11:51:21 -0400, James Kuyper wrote:
... everything it says about one is about
the implementation as a whole, not the individual parts.
>
You don’t see the problem with trying avoid clashes between those parts?
I think everyone is aware of the problem. Was that your point?
The standard reserves certain identifiers for use by the implementation.
The implementation includes the standard library described in section 7,
not to all the libraries that happen to be installed on a system; those
libraries, as far as the standard is concerned, are just user code.
Third-party libraries are, for example, not permitted to define
identifiers starting with two underscores, because those same
identifiers might be used by the standard library or by the compiler.
This is typically not enforced, but using such an identifier in code
that's not part of the standard library has undefined behavior. (I've
seen plenty of such identifiers in third-party code; it typically
doesn't cause a problem in practice unless there's an actual collision.)
If your point is that "name collisions are a problem", of course that's
true. Name collisions within the standard library are typically not a
problem. The standard library is typically provided either by a single
implementer or by a few implementers who are very careful to avoid
collisions.
C doesn't provide a namespace facility like C++'s, so implementers of
third-party libraries might use identifier prefixes or other tricks to
avoid collisions.
Again, have you actually seen name collision problems in the real world?
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comWorking, but not speaking, for Medtronicvoid Void(void) { Void(); } /* The recursive call of the void */