Sujet : Re: question about linker
De : jameskuyper (at) *nospam* alumni.caltech.edu (James Kuyper)
Groupes : comp.lang.cDate : 12. Dec 2024, 20:39:09
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vjfe4t$2tb6r$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
User-Agent : Mozilla Thunderbird
On 12/12/24 00:07, Janis Papanagnou wrote:
On 12.12.2024 05:38, James Kuyper wrote:
On 12/10/24 20:32, Scott Lurndal wrote:
[...]
>
You're confusing name spaces and namespaces.
It became quite obvious that you both were talking at cross purposes.
Personally I'd colloquially take both those terms as the same thing,
but I'm not a native speaker.
They are not.
The C standard does not define the term "name space", relying instead
upon the general CS definition of the term. However, it has a whole
section (6.2.3) devoted to listing and explaining the name spaces that
are relevant to the C language.
In C++, "namespace" is a both a keyword (listed in 5.11p3) and a piece
of terminology (defined in 9.8p1) for the feature enabled by that
keyword. It is clear from those descriptions that a C++ namespace is
significantly different thing from a C name space.
Unlike the C standard, the C++ standard doesn't even bother explaining
name spaces. It makes only two uses of that term on it's own behalf, in
connection with statement labels and macro names - neither usage has any
plausible connection with a namespace. There are several occurrences of
"name space" in the section describing the differences between C and
C++, which make it clear that both standards are using the same meaning
for "name space", but that the two languages have a different number of
name spaces, with different contents.