Re: [eigen] Namespaces

[ Thread Index | Date Index | More Archives ]

we initially used namespaces, but switched to prefixing recently. The reason 
is that namespace offer little protection as most users will want to 
be "using namespace". For instance look at the EiObject class. Without 
prefix, it'd be Object. A much too common name. If we encapsulate it in a 
namespace, it becomes Eigen::Object, which is safe, but... most users would 
like to "using namespace Eigen" and if some class is called "Object" 
then "using namespace" is not an option, because "Object" is a too polluting 

Look at what Qt does. Qt classes are not encapsulated in any namespace, 
instead they have the Q prefix, like "QObject".


On Wednesday 10 October 2007 20:09:06 Konstantin Heil wrote:
> Hello!
> Why don't you use a namespace eigen instead of having this leading "Ei"s in
> front of the classes?
> Greetings
> Konstantin

Attachment: signature.asc
Description: This is a digitally signed message part.

Mail converted by MHonArc 2.6.19+