Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Moderated > Re: post-c++0x:...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 9338 of 10094
Post > Topic >>

Re: post-c++0x: modules in c++

by Bart van Ingen Schenau <bart@[EMAIL PROTECTED] > Mar 1, 2008 at 05:03 AM

german diago wrote:

> 
>> In my view, making the using directive implicit in the im****t
>> directive has the same net effect as completely removing namespaces
>> from the language.
> 
> This does not remove namespaces at all since because if you fully
> qualify
> a name, it will be still there, where it was before.

I didn't say it actually removes them, it just defeats the entire reason
for having them in the first place.
Yes, I can still qualify my names and if there happens to be a
name-clash, I will be forced to do so for every occurrence of the name
as if the namespace name is a prefix to the actual name.

> 
>> You could resolve the conflict with explicit qualification, but the
>> purpose of a drop-in replacement is that you do not have to go
>> through all the code to find and change each use.
> 
> You could still use a namespace alias at the top of the module, and
> everything could go ok:
> 
> using sort = optimised_sort::sort;

This is not a namespace alias.
This is, and it would not help me one bit:
   namespace os = optimised_sort;

> and everything would be located at the beginning of the module without
> that problem. What do you think of this solution?

I think it would be a non-solution for a problem that should not be
introduced in the first place.
The rules for unqualified name lookup are already difficult enough,
without adding more complexity due to this kind of generic name
aliasing.

Bart v Ingen Schenau
-- 
a.c.l.l.c-c++ FAQ: http://www.comeaucomputing.com/learn/faq
c.l.c FAQ: http://c-faq.com/
c.l.c++ FAQ: http://www.para****ft.com/c++-faq-lite/

      [ See http://www.gotw.ca/resources/clcm.htm
for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
 




 1 Posts in Topic:
Re: post-c++0x: modules in c++
Bart van Ingen Schenau &l  2008-03-01 05:03:04 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 8:08:44 CDT 2008.