| Re: post-c++0x: modules in c++ |
|
 |
|
 |
|
 |
|
 |
Group: comp.lang.c++.moderated · Group Profile
Author: Martin BonnerMartin Bonner Date: Feb 29, 2008 10:42
On Feb 28, 11:05 pm, german diago gmail.com> wrote:
> On 27 feb, 17:53, dizzy roedu.net> wrote:
>
> I wouldn't use "using
> namespace" for ANY big namespace with alot of common names (one good
> example is "std" where it makes sense to write "std::list" as oposed
> to just "list" since in a big project you have several kinds of lists
> from various places).
>
> The implicit using directive wouldn't force you not to use std::list
> in the case of ambiguity, so you don't get ANY problem with
> name clashes.
Yes you will. The compiler won't be confused, but if I see "list" in
a particular file I will assume that it is std::list (just like in the
other 5000 files in the code-base). However in this particular case,
it may refer to some other list.
If one has a standard of always writing std::list, and then I just see
a naked list, I will expect it to be something different. Please
don't say "but you still /can/ write std::list"; I like my compiler
set up to enforce my coding conventions.
The main point of code is to communicate with other programmers - not
the compiler. Requiring import to force a "using namespace" will
complicate that.
|