On Tue, Sep 13, 2016 at 2:23 PM, Davide Andreoli <d...@gurumeditation.it> wrote: > 2016-09-13 15:59 GMT+02:00 Gustavo Sverzut Barbieri <barbi...@gmail.com>:
[snip] > This is one of the issue that make me don't like promise! > > Currently you are implementing promise only for async stuff that have a > single completion callback, so ecore_timeout is a promise while ecore_timer > don't. > > This is highly confusing, timer and timeout are quite the same and they > should use the same API. If we are searching for a unified way to handle > async stuff we really should have ALL our async stuff to use the same > system. What is so confusing about it? One is recurring and uses a recurring system, a.k.a events, the other is about async operation and uses a async operation primitive, a.k.a promise. You can, of course, hammer anything in both, you can also hammer a float in an int, but I don't see people saying that using float is so confusing. Things are different because they behave differently. We do lack documentation, that indeed makes things more confusing, but that is not the fault of promises or async or threads or ints. It is quite simple actually: Events are recurring, promises are not. Remembering this single statement makes all confusion go away. Do you want a timer that occurs every 2s? Events, obvious. Do you want to be called back once in 2s? A promise. Very simple. Regards, -- Felipe Magno de Almeida ------------------------------------------------------------------------------ _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel