Namespaces

  • Thread starter Marcin Vorbrodt
  • Start date
K

Kevin Goodsell

dwrayment said:
please dont bore me with this shit. i wil say whatever i like, if you dont
like it you dont have to read it.

That's right, I don't.

*PLONK*

-Kevin
 
J

jeffc

Peter van Merkerk said:
If you have to ask that you are really clueless about namespaces and even
more so about large scale projects. Classes and namespaces address two very
different issues.

Well, usually. The use of static public members in a class amounts to a
namespace.
 
J

jeffc

Agent Mulder said:
Few can claim to understand namespace.
Wow.

And once I understand it, does it mean that I will like it?

It's generally poor form to argue that you don't like something until you
get it.
 
A

Agent Mulder

</>

It's generally poor form to argue that you don't like something until you
get it.
</>

A little rhetoric perhaps. But I have to resort
to rhetorics because I am afraid I'll never
understand namespace.

In VC++, for every unnamed namespace in
every compilation, a unique name is created
based on the day and the time of compilation,
up to the second. Isn't that horrible?

<Robert Schmidt>
Visual C++ synthesizes the hidden name from the source file's path and time/date of compilation. With such a naming algorithm, the
compiler minimizes the chance of two translation units using identical hidden names
</>

It is almost as bad as programmers comming up with their
home-grown #include guards :)

Read more at

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndeepc/html/deep08272002.asp
 
J

jeffc

Agent Mulder said:
In VC++, for every unnamed namespace in
every compilation, a unique name is created
based on the day and the time of compilation,
up to the second. Isn't that horrible?

The point that people are trying to make here is that namespaces solve some
common problems. The problem you mention I've never run into. I've run
into 3rd party name clashes many times. It's like you're being bitten by
mosquitoes in your American backyard, but you refuse to use bug spray
because you read somewhere that the bug spray doesn't work very well on some
particular strain of mosquito found in northern New Guinea. So what?
Listen, don't use it. Fine. One day if you start getting bit, then use it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top