Jump to content
  • Advertisement
Sign in to follow this  
virious

Anonymous enums

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

Is it possible (or planned in your TODO list) to enable unnamed enums declarations in the AS scripts?

Thanks in advance :).

Regards
virious

Share this post


Link to post
Share on other sites
Advertisement
I hadn't really thought of it before now. Currently it is not possible, it would require code changes.

Why do you feel anonymous enums would be needed? What would the advantage be?

Share this post


Link to post
Share on other sites
In C++-land, I consider them a useful alternative to integer macro constants, so long as you have the ability to manually specify the 'backing' type. (like you can do with some MSVC language extensions and as a part of the new C++11 standard) This has the advantage that you fundamentally can't do weird things like &MAX_ARRAY_SIZE, etc. but this isn't actually an issue in Angelscript.

Actually, strongly-typed enums could be an interesting feature in of themseves.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!