Sorry for the lousy title, but I don't really want to post half a dozen separate threads. Hope that's ok!
I'm implementing an angelcode interface to our software. I'm generally very happy with both the API and language itself, but I still have some questions.
1. Is there a way to pass a C++ lambda to RegisterObjectBehaviour? I find myself writing numerous one-liners when existing functions don't _quite_ match what I want to expose to the script. A lambda would save a bit of code.
2. Is it possible to create a script function that takes something like an initializer_list (from C++)? I have some cases where being able to pass any number of arguments (all of the same type) would be very useful.
3. I have asEP_USE_CHARACTER_LITERALS set to true. However, the engine still accepts multiple characters between single quotes. Is this intended behaviour?
4. Am I correct in assuming that DiscardModule also changes the internals of the engine, and should therefore also only be called from one thread? Or at least be protected by a mutex?
5. I'm still a little unclear on how often I should be collecting garbage. When I call GetGCStatistics() all five parameters always return 0, even though quite a bit of script activity has been going on by then. Our use case involves running scripts for up to six months at a time, so I'd like to make sure we do the garbage collection correctly and not run out of memory halfway through.
Thanks in advance!