Deutsch   English   Français   Italiano  
<vjg2p8$31ffg$1@dont-email.me>

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

Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: James Kuyper <jameskuyper@alumni.caltech.edu>
Newsgroups: comp.lang.c
Subject: Re: question about linker
Date: Thu, 12 Dec 2024 20:31:20 -0500
Organization: A noiseless patient Spider
Lines: 70
Message-ID: <vjg2p8$31ffg$1@dont-email.me>
References: <vi54e9$3ie0o$1@dont-email.me> <vik28b$390eg$1@dont-email.me>
 <vik8tc$3ang9$1@dont-email.me> <vikjff$3dgvc$1@dont-email.me>
 <viku00$3gamg$1@dont-email.me> <vil0qc$3fqqa$3@dont-email.me>
 <vil82t$3ie9o$2@dont-email.me> <vila9j$3j4dg$1@dont-email.me>
 <vin4su$49a6$1@dont-email.me> <vin95m$5da6$1@dont-email.me>
 <vinh3h$7ppb$1@dont-email.me> <vinjf8$8jur$1@dont-email.me>
 <vip5rf$p44n$1@dont-email.me> <viprao$umjj$1@dont-email.me>
 <viqfk9$13esp$1@dont-email.me> <vjaplo$17cob$1@dont-email.me>
 <GY56P.6170$YoTc.5109@fx39.iad> <vjdpct$1viqk$1@dont-email.me>
 <vjdr36$201k4$1@dont-email.me> <vjfe4t$2tb6r$1@dont-email.me>
 <vjfgut$2u2t8$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 13 Dec 2024 02:31:26 +0100 (CET)
Injection-Info: dont-email.me; posting-host="1f403b47916cb6937002303612cac34f";
	logging-data="3194352"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18ndYy6JgAWTpuaBo0ehVoBJ9GtSwt97lY="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:gFF/iVT1OJixL9X+wmApfbMgj70=
Content-Language: en-US
In-Reply-To: <vjfgut$2u2t8$1@dont-email.me>
Bytes: 4861

On 12/12/24 15:27, Janis Papanagnou wrote:
> On 12.12.2024 20:39, James Kuyper wrote:
>> On 12/12/24 00:07, Janis Papanagnou wrote:
....
>>> 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.
>
> You seem to be speaking about terms in different standards while
> I spoke about "colloquially", the meaning of an expression named
> "name space", or "name-space", or "namespace" (whatever is the
> correct writing in English would be; note my hint about native
> speakers). - So, now, have we two been speaking cross-purpose?

Probably. It is never a good idea to use a term colloquially if that
term has a well-defined meaning that applies in the relevant context
which is significantly different from the colloquial meaning. Such usage
inevitably results in confusion.

> Note that Scott in his post wrote
>
> In C++ they reside in the ordinary name space only if they're not
> part of a named namespace.
>
> which I interpreted as
>
> In C++ they reside in the ordinary "name space" only if they're not
> part of a named 'namespace'.
>
> where "name space" would be the [colloquial] name of the concept
> behind the symbol 'namespace'.
>
> My interpretation of his post was that he wanted to differentiate
> the default 'namespace' from the "named 'namespace'". (And that
> the three types of "Name Spaces" (that you had in mind) were not
> his concern with his remark.)

That is a true statement about namespaces, and completely irrelevant to
anything I was trying to say about name spaces.

He said that in response to my comment, which was supposed to be:

"In C struct, union, and enumeration tags have their own name space, in
C++ they reside in the ordinary name space."

However, I just noticed that, in my message as I actually posted it, I
accidentally replaced the first occurrence of "name space" in that
sentence with "namespace". Nothing in that sentence was intended to be
about namespaces; it was entirely about name spaces. Does that clear up
any confusion?