3 ms·
I recently wrote a couple dozen lines of code around Windows Fibers for cooperative multitasking. This makes for much nicer code than the callback style approac
by jstimpfle 8y ago
I recently wrote a couple dozen lines of code around Windows Fibers for cooperative multitasking. This makes for much nicer code than the callback style approach from Javascript.
But anyway for a larger codebase that is about GUI interaction I figure you want more control than what these models provide. You don't want to write event handlers that "push" actions. You want to pull them and process them in a known context.
String handling in C is in general much better than its reputation. You just need to write a couple lines that format to allocated buffers. And you want to error out in case of OOM. Can't check each allocation on the spot. And you need some sort of pool that can release all allocations of the same lifetime at once. (I don't know that this approach is practical for typical web applications, which are extremely string-heavy. It is indeed quite practical for games or compilers.)