First of all, I am looking for such (c++ style) script for a long time and very happy that angelscript exists.
I am working on design even simpler interface to register c++ objects / functions so that I can easily register many good c++ libraries and make it a general purpose language.
I met some problem when dealing with arguments passing to functions. The const T&in type will always cause a copy constructing for the object passed in and the object will be destroyed after the function ends, and const T&out will create a new object to pass into the function and copy it back to the original object after the function ends. These two behaviors happen no matter for value object type or reference object type. These behaviors are different from c++ and will cause some problem.
Since for reference object type, neither const T &inout or T &inout do the copy and I think const T&in should be the same as const T &inout, so that is not a implementation problem.
I am wondering what's the original thought of &in and &out? Since the caller will always hold a reference or the value so the object will not be destroyed during the call, and const will control whether the function can modify it or not, so why do we need &in and &out?