> Le 7 déc. 2015 à 07:48, Andrea Giammarchi <andrea.giammar...@gmail.com> 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
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss