2016-09-13 20:05 GMT+02:00 Felipe Magno de Almeida <
felipe.m.alme...@gmail.com>:

> 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.
>

In my view timers are async exactly as timeout are, I really cannot see why
they should have a totally different API... just because one is recurring
and
the other is not?
For sure having 2 different API will not make the usage simpler for the
final user.


>
> 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.
>

It's not "very simple", at least is more complex that the system we have
right
now, and will require the user to learn 2 stuff instead of just one.



>
> Regards,
> --
> Felipe Magno de Almeida
>
> ------------------------------------------------------------
> ------------------
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
------------------------------------------------------------------------------
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to