• Advertisement
Sign in to follow this  

Remove global namespace accessor?

This topic is 1855 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement