[Insight-developers] ITK namespace delimiter discussion
Brad King
brad.king at kitware.com
Mon Aug 14 13:48:56 EDT 2000
After some discussion amongst a small group of us off the list, it has
been decided that the ITK_NAMESPACE_BEGIN and ITK_NAMESPACE_END macros may
not be a good idea. The alternative we propose is to go back to the
namespace itk
{
//...
} // namespace itk
approach, but indent everything inside the namespace by two extra spaces:
namespace itk
{
//...
} // namespace itk
This would leave the namespace's closing "}" as the only one in the
left-most column, thus making it obvious. It does, however, take all
function opening "{" and closing "}" characters out of that column, and
indent them two spaces. It also reduces the number of characters per line
by two before running over the 79 character guideline.
Before I make any changes related to this, I'd like the list to reach a
consensus on which way to go. The choices that have been proposed are:
// 1
namespace itk
{
// old style, don't indent inside namespace
// requires comment at end of namespace
} // namespace itk
// 2
namespace itk
{
// new style, indent namespace by 2 characters
} // ending comment optional, only "}" in this column.
// 3 (appropriate macros defined in header)
ITK_NAMESPACE_BEGIN
// no need to indent, no "{" characters appear.
ITK_NAMESPACE_END
// 4 (appropriate macros defined in header)
BEGIN_NAMESPACE (itk)
// no need to indent, no "{" characters appear.
END_NAMESPACE (itk)
Capitalization of macros is up for debate, of course.
-Brad
More information about the Insight-developers
mailing list