Jump to content

  • Log In with Google      Sign In   
  • Create Account

- - - - -

using namespace


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 iraxef   Members   -  Reputation: 399

Like
0Likes
Like

Posted 12 December 2013 - 09:24 AM

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

 

Thank you very much.



Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3445

Like
0Likes
Like

Posted 12 December 2013 - 05:18 PM

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

#3 iraxef   Members   -  Reputation: 399

Like
0Likes
Like

Posted 13 December 2013 - 10:46 AM

Fair enough.

 

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



#4 Andreas Jonsson   Moderators   -  Reputation: 3445

Like
0Likes
Like

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.


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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS