Advertisement Jump to content
Sign in to follow this  
iraxef

using namespace

This topic is 1866 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

Would it be possible to ask for a status update on implementing the 'using namespace' feature in script?

 

Thank you very much.

Share this post


Link to post
Share on other sites
Advertisement

It has a little bit of challenges. But not too much I believe.

 

A few things that needs to be decided/designed:

 

- What should the scope of the 'using namespace' statement be? The order in which global declarations are made in AngelScript doesn't matter, so probably a global 'using namespace' statement should make the used namespace visible globally in all script sections in the module. A 'using namespace' statement within a statement block (or other namespace block) should only be visible in that block.

- How to handle name conflicts when the used namespace has entities with the same name as the namespace it is included in? Should it give an error? Or should the names from the used namespace be invisible?

- Currently the symbol lookup is done recursively in a few places of the code. This needs to be changed to allow the lookup in the used namespace when necessary.

 

Mostly the reason that I haven't implemented this already is due to prioritizing other improvements that I judge as more valuable at the moment.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!