I am working currently on a game engine with design concepts similar to that of the Unreal Engine. In Unreal, almost all application logic is controlled through Unreal Script. That is really all that is needed to be known about that to get the jist of what direction I am going with my engine.
One of the challenges I faced early on is one that is covered in a few pages in the manual, where objects need to be passed back down to the compiled application prior to the type actually being known. I tried using the any type and the variable parameter, but to me, they all felt hackish and more like workarounds than actual solutions.
I was able to rectify this situation by registering an interface with no functions. Just a simple little interface that I was able to use to pass objects back down to the compiled application. Basically, anything that inherited from 'object' was usable anywhere, just as in Java and C#. This was not only useful for passing classes back down to the application, but it was also useful for creating generic containers within the script such as linked lists, queues, and stacks. However, that is about where the usefulness ends, because when it comes to application registered classes, they don't inherit the object type, so storage using this method is impossible without introducing some other specialized wrapper object. This to me seems unnecessary.
I understand that AngelScript is meant to be customizable and configurable, but many, many design challenges we are faced with when using it could easily be rectified by introducing a base type, even if it is optional. So what I can see is something at the engine level that registers the name of the base type that objects could inherit from, something like
void asIScriptEngine::RegisterBaseType(char*);
Other potential benefits could include greater simplification of the interpreter, because with a base type, [potential_landmine]templates could be rendered unnecessary.[/potential_landmine]
I guess I should also ask, are there plans in place to include such a feature in upcoming versions?