There are some tiny parts, that would be difficult with another language. Consider an autotest code. Normally ui tests are run in a separate process because the testing code needs to be synchronous. In nimx autotests may be written like: uiTest generalUITest: sendMouseDownEvent(mainWindow, newPoint(50, 60)) sendMouseUpEvent(mainWindow, newPoint(50, 60)) sendMouseDownEvent(mainWindow, newPoint(50, 90)) sendMouseUpEvent(mainWindow, newPoint(50, 90)) waitUntil(someCondition) sendMouseDownEvent(mainWindow, newPoint(50, 120)) sendMouseUpEvent(mainWindow, newPoint(50, 120))
Under the hood every statement of a test block is executed by timer with some delay allowing the main loop to run for some time. This allows to write ui tests that run on all target platforms, including mobile and web. Can't wait until JS gets closure iters support so that async stuff is available. That would allow different crazy stuff like running animations "synchronously".