Would it be possible to ask for a status update on implementing the 'using namespace' feature in script?
Thank you very much.
Jump to content
Posted 13 December 2013 - 03:23 PM
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.