On Monday, 6 January 2014 at 19:44:07 UTC, Adam D. Ruppe wrote:
The separate event loop is nice because integrating loops is a
bit of a pain.
Yes, and you might want to have multiplayer or peer-to-peer over
bluetooth/network also. So if all interaction i/o provide the
same interface you might be able to get cleaner code.
and so on. Then the higher level things can build on this to do
whatever - minigui.d for example uses a javascript style
item.addEventListener thingy.
Interestingly, Dart made that more uniform by using a stream
abstraction:
abstract StreamSubscription<T> listen(void onData(T event),
{Function onError, void onDone(), bool cancelOnError})
So you can do "item.onClick.listen( (e){dosomething(e);} )"