Sign in to follow this  
Paril101

Remove global namespace accessor?

Recommended Posts

Hey there.

 

Another simple question I figure I'd place in another thread.

I have some scripts which interface highly out to C++. Now, I added a lot of types which the scripts need to use - however, the code is littered with the global namespace accessor. For instance:

 

namespace Default
{
	class DefaultRenderer : ::IBlockRenderer
	{
		void Render(::Block block, ::Point3i position)
		{
			::renderer.Draw(::Box().SetAll(::Point2i(0, 0), ::Colorb(255, 0, 255, 255)));
		}
	}
}

 

 

Is there any way I can get rid of these? I know it's because these are in a namespace, but, I use them to keep scripts separate and enforce that they be in their own namespace. With them it can't seem to resolve the global scope automatically.

 

Was this just a design choice?

 

-P

Edited by Paril101

Share this post


Link to post
Share on other sites
The namespace feature does not yet support searching in parent namespaces when looking up symbols. I will implement this support, but I haven't gotten to it yet. I wanted to give the basic namespace feature some time to mature first, i.e. time enough for people to use it to find most of the bugs.

I hope to get the time to implement the search in parent namespace early next year (at least the first half of the year).

Regards,
Andreas

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this