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! ]


|