Re: Symbol tables and scopes

Nathan Moore <nathan.moore@cox.net>
17 Feb 2006 00:06:35 -0500

          From comp.compilers

Related articles
[10 earlier articles]
Re: Symbol tables and scopes cfc@shell01.TheWorld.com (Chris F Clark) (2006-02-11)
Re: Symbol tables and scopes cbarron413@adelphia.net (Carl Barron) (2006-02-12)
Re: Symbol tables and scopes DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2006-02-14)
Re: Symbol tables and scopes DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2006-02-14)
Re: Symbol tables and scopes david.thompson1@worldnet.att.net (Dave Thompson) (2006-02-14)
Re: Symbol tables and scopes alexc@TheWorld.com (Alex Colvin) (2006-02-14)
Re: Symbol tables and scopes nathan.moore@cox.net (Nathan Moore) (2006-02-17)
Re: Symbol tables and scopes alexc@TheWorld.com (Alex Colvin) (2006-02-17)
Re: Symbol tables and scopes david@tribble.com (David R Tribble) (2006-02-24)
Re: Symbol tables and scopes david@tribble.com (David R Tribble) (2006-02-24)
Re: Symbol tables and scopes david@tribble.com (David R Tribble) (2006-02-24)
Re: Symbol tables and scopes david@tribble.com (David R Tribble) (2006-02-24)
Re: Symbol tables and scopes DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2006-03-05)
[1 later articles]
| List of all articles for this month |

From: Nathan Moore <nathan.moore@cox.net>
Newsgroups: comp.compilers
Date: 17 Feb 2006 00:06:35 -0500
Organization: Cox Communications
References: 06-01-101 06-02-027 06-02-045 06-02-056 06-02-063 06-02-086 06-02-100
Keywords: symbols, C++
Posted-Date: 17 Feb 2006 00:06:35 EST

Alex Colvin wrote:
> My experience is that a typical C++ program consists almost entirely
> of names with global scope. Note that this includes types, constants,
> members, etc. Pretty much everything in a header file.
>
> I almost never see #include... anywhere but a top-level scope. And my
> experience with C++ is that most of the program moves into the header
> file.


Just because the #include statements are in what you might think of as
a global/top level scope section does not mean that the symbols that the
statement brings in are global. In C++ most everything is supposed to
be in the namespace std. I believe this is what was being referred to,
and why the global namespace of a WELL WRITTEN C++ program would be
fairly empty. This is often not the case because of all the C included
and because WELL WRITTEN isn't all that common.


Nathan


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.