I think it would be great if AngelScript supported properties (a kind of variables, which are accessed via pair of Get/Set functions). The actual variable may not even exist at all.
Consider the following example:
Let's say we have an in-game console and player has a [limited] access to internal game variables. Wouldn't it be nicer to let him type like:
[CONSOLE] game.maxPlayers 32
when he wants to set the max number of players instead of clumsy
[CONSOLE] game.SetMaxPlayers( 32 )
Of course it is possible to export variable maxPlayers through RegisterObjectProperty(), but what if this variable is not allowed to be changed at any time (and/or some action is required to be taken upon its change)?
You could use a class type with an assignment operator to emulate the setting behavior. Catching gets is more difficult. I'd do it in C++ with a copy constructor. The copy is 'getting' the value of the source. Whenever you pass by value the copy constructor is called. SomeClass.Member won't call it, but as soon as you try and store it or use it in any way, it will be called.