All,

Usage of namespaces in our code is very ugly, as we divide things in
main-level namespaces.

In headers, we have lot of "Firebird::". They're specially ugly in this
type of usage:
Firebird::Pair<Firebird::Full<Firebird::string, Firebird::MetaName> > >

With make almost "obligatory" to create extra typedefs.

I suggest we fix namespace usages in an incremental manner. How?

We put in firebird.h this:
-------------------
namespace Jrd
{
}

namespace Firebird
{
    namespace Engine
    {
        using namespace Jrd;
    }
}
-------------------

Then we define (or change as we edit files) Jrd modules to use this
namespace:
-------------------
namespace Firebird
{
    namespace Engine
    {
        class EngineClass
        {
            CommonClass x2;
        };
    }
}
-------------------

This way subsystems are children of Firebird namespace and don't require
"Firebird::" everywhere. We also avoid "using namespace Firebird" in
implementation files.

Code placed in firebird.h makes Firebird::Engine and Jrd as compatible.

(I showed what to do to Jrd, but the same idea should be applied to all
subsystems)


Adriano

------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to