using namespace

Started by
2 comments, last by WitchLord 10 years, 4 months ago

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

Thank you very much.

Advertisement

Simple answer: I've made no progress at all towards this :)

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Fair enough.

From your perspective, where is that task on the spectrum of challenging vs tedious?

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.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement