Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

2
How many namespaces is "too many" in C++
Post Flair (click to view more posts with a particular flair)
Post Body

In my Godot C module, I have some code in a header file that looks something like this:

namespace CompanyName
{

namespace GameName
{

namespace Actors
{

class Character
{
    //...
};

};

};

};

I'm a little worried that this is too many namespaces, and the class name will be to difficult to type out because of it. (CompanyName::GameName::Actors::Character would have to be everywhere the class is used)

On the other hand, I need these namespaces to differentiate my code from third party code, this particular game's code from the code of one of my other games, and this specific part of the game's code from other parts of its code.

Which namespaces should I leave out (if any at all)?

Author
Account Strength
60%
Account Age
6 months
Verified Email
Yes
Verified Flair
No
Total Karma
664
Link Karma
200
Comment Karma
464
Profile updated: 22 hours ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
4 months ago