In article <64t180F2dcf9oU1@[EMAIL PROTECTED]
>, r124c4u102@[EMAIL PROTECTED]
says...
[ ... ]
> > That is NOT a using directive but a perfectly (to me) acceptable using
> > declaration.
>
> Granted, it's a declaration and not a directive.
>
> Now let's see if I have this straight. Let's say, just for the sake of
> argument, that stealing is a bad thing. But it is "perfectly
acceptable" if
> you only steal *one* thing at a time? Is that the rule?.
A poor analogy. Likening it to stealing, implies that either a using
directive or a using declaration is fundamentally wrong.
That's not the case -- they're included in the language because there
are times that (albeit open to some disagreement) it's perfectly
reasonable to put them to use.
The fundamental difference between the two is that a using declaration
makes a specific, controlled set of names visible, whereas a using
directive makes a more or less unknown set of names visible. In the case
of namespace std, that set of names is not merely "more or less
unknown", but in fact, unknowable -- i.e. the implementation has
specific permission to include names of which you are unaware, and can
add more names more or less at will. The user is also allowed to add
specializations in namespace std, adding yet another possible set of
"stuff" that you're making visible.
In short, the result from a using declaration is known and predictable.
The result from a using directive is (at least partially) unknown and
unpredictable.
--
Later,
Jerry.
The universe is a figment of its own imagination.


|