yup, that's what my library does as well. I thought Bergi meant in absolute.

On Tue, Dec 8, 2015 at 5:38 PM, Tab Atkins Jr. <jackalm...@gmail.com> wrote:

> On Sun, Dec 6, 2015 at 10:48 PM, Andrea Giammarchi
> <andrea.giammar...@gmail.com> wrote:
> > 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.
>
> This pattern is fine; different overloads of a function are basically
> different functions, and we're using this pattern in the web platform
> in a few places to "update" some CB-using APIs to Promises.  As long
> as the function previously returned void and took the CB last, we can
> do it.
>
> ~TJ
>
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to