I have an objection to that, async is just a special case of sync, like
square to rectangle. Why shouldn't the promise be inviolable?

On Mon, 7 Dec 2015 7:00 pm Claude Pache <[email protected]> wrote:

> Le 7 déc. 2015 à 07:48, Andrea Giammarchi <[email protected]> a
> écrit :
>
> I've asked for opinions and if in 2 days I haven't replied means I got it
> my idea is not welcome which is OK and fair enough.
>
> However, I'm curious to know about this "Functions that sometimes return
> promises and sometimes not are already known to be an antipattern"
> because I have a library that does that in somehow explicit way (if you
> pass a callback it doesn't return  a promise, it invokes such callback once
> resolved) and it works without any real-world problem.
>
> Mind pointing me at the library that failed returning Promises arbitrarily?
>
>
> The blog post pointed by Ron earlier in this thread contains a discussion
> about how sync and async code differ, and thus why it is generally not a
> good idea to execute random code sometimes asynchronously and sometimes not
> (with a pointer to a concrete example). It is worth reading.
>
> —Claude
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to