Advertisement

[EXPERIMENTAL PATCHES] Named arguments and auto declarations.

Started by January 22, 2014 05:06 AM
14 comments, last by WitchLord 10 years, 7 months ago

Andreas,

are there any plans to incorporate this into 2.28.2? The patches have already started to bitrot...

Best regards,

Victor

If not, don't worry, I'll keep these patches up to date with new angelscript versions as they get released. It's not really feasible or useful to update them for every new svn revision, but since the project I work on uses these patches, they'll be updated with version releases. No need to rush anything.

Advertisement

I'm not sure if I'll add them for 2.28.2. But I definitely plan to incorporate them into the library with the 2.29.0 release.

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

I've incorporated the 'named arguments' patch in revision 1884.

Regards,
Andreas

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

That is very cool! Thanks GGLucas for submitting these patches.

Andreas: I understand where you are coming from on not really caring about auto in C++.

It seems like a great idea but it also seems like it might cause problems at times, especially if you ever try and compile your code on much older compilers.

My other issue with auto for iterators is if I change a template container, all uses of it no longer throw compile errors since it just 'automatically works', however I often need to review all accesses of a container when I change its container type since some invalidate iterators or pointers to objects during different operations.

Thankfully neither of these should be much of an issue in Angelscript since your not likely to port Angelscript code to another game/older C++ compiler and container types/pointers are more limited in script.

I also really like that you are willing to include features outside of C++ when they seem like a really good idea and don't have many cons. Named arguments sounds really nifty, especially for longer function calls where a little more self documentation would be nice.

Lead Coder/Game Designer for Brutal Nature: http://BrutalNature.com

I've included the 'auto declarations' patch in revision 1893.

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