Discussion:
[ast-developers] Allowing '.' in namespace names?
Cedric Blancher
2013-05-29 10:18:57 UTC
Permalink
Is there any reasons why namespaces do not allow '.' in names?
I like to use namespace names like fr.pasteur.dev.bio.model2cpv or
fr.pasteur.dev.bio.utilities to allow parallel and independent
utilities for bioinformatics.

Ced
--
Cedric Blancher <cedric.blancher at googlemail.com>
Institute Pasteur
David Korn
2013-05-29 13:18:17 UTC
Permalink
cc: cedric.blancher at googlemail.com
Subject: Re: [ast-developers] Allowing '.' in namespace names?
--------
Post by Cedric Blancher
Is there any reasons why namespaces do not allow '.' in names?
I like to use namespace names like fr.pasteur.dev.bio.model2cpv or
fr.pasteur.dev.bio.utilities to allow parallel and independent
utilities for bioinformatics.
Ced
You can do this by doing
namespace fr
{
namespace pasteur
{
namespace dev
{
namespace bio
{
namespace model2cpv
{
....
}
}
}
}
}

The drawback with multiple levels is that name lookup may be longer.
It is the equivalent to using longer pathnames for files.

It would be faster t use
namespace fr_pasteur_dev_bio_model2cpv

David Korn
dgk at research.att.com

Loading...