Monty Taylor wrote:
I think we should introduce a new style or policy on the use of using
namespace. Currently, the only policy we have on this is that using
namespace must never be used in headers, and the implementation should
always do using namespace std;
As we put more and more things into the drizzled namespace, we're going
to want to use them. So, I propose that we never use using namespace
deeper than:
using namespace drizzled;
If we using namespace further down than that:
- we lose greppability
- we lose benefits of multiple distinct namespaces. We can't have
drizzled::command::Select and drizzled::message::Select without being
really careful, which is sort of losing part of the point. Even if we
are careful, it becomes unclear to a human reader which Select we're
talking about. On the other hand, if we only do using namespace
drizzled;, then we have message::Select or command::Select in the code -
and that's a piece of cake.
I think we should apply the same to our use of protobuf stuff... as in,
only do using namespace google;, so that it's clear from reading code
that Message is, in fact, protobuf::Message and not drizzled::Message
and that CodedOutputStream is protobuf::io::CodedOutputStream. With that
- we will implicitly never make a drizzled::protobuf namespace, because
that would just be confusing as all hell.
Does anyone disagree with this?
I am 100% in agreement with the above.
-jay
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp