|
|
|
|
|
by greggman
4444 days ago
|
|
The biggest advantage of scripting for me has been 1. Co-routines Co-routines (co-operative multi-tasking?) mean you can do stuff like while (isWalking()) {
advance();
yield();
}
This is effectively 'yield' from Python, C#, etc.. You can implement this in C++ by swapping stacks and calling setjmp but there's usually issues.2. Iteration time You can usually swap script code live. This project aims to fix that for C++ though I'm a little skeptical it can stay robust https://github.com/RuntimeCompiledCPlusPlus/RuntimeCompiledC... |
|
Boost has a c++ implementation but it looks quite different:
http://www.boost.org/doc/libs/1_55_0/libs/coroutine/doc/html...
[1] http://supercollider.github.io
edit: pythons new asyncio stuff looks very interesting:
https://docs.python.org/3.4/library/asyncio-task.html