Re: Simplify async code-flows and unify unit tests

2013-05-08 Thread Mike de Boer
Hi Sam! Thanks for taking the time to read and reply! Please read my answers inline... On May 8, 2013, at 3:11 PM, sam foster wrote: > I want to add my +1 to the goal of unifying and streamlining the setting up > of test flows and a common assertion syntax. > Yay! > I know some of the iss

Re: Simplify async code-flows and unify unit tests

2013-05-08 Thread Mike de Boer
Hi Joshua! Thanks for taking the time to read and reply! Please read my answers inline... On May 8, 2013, at 6:17 AM, Joshua Cranmer 🐧 wrote: > On 5/7/2013 8:49 AM, Mike de Boer wrote: >> I've told some of you before that I'm not a big fan of Promise libraries (if >> not, please read the 10 r

Re: Simplify async code-flows and unify unit tests

2013-05-08 Thread sam foster
I want to add my +1 to the goal of unifying and streamlining the setting up of test flows and a common assertion syntax. I know some of the issues you raise with Promises (like getting a useful stack on exceptions) are being discussed and addressed already. I dont have all the context, but IST

Re: Simplify async code-flows and unify unit tests

2013-05-08 Thread Mike de Boer
Hi Mark! Thanks for taking the time to read and reply! I really don't have an aversion to using Promises at all! I'm trying to point out that continuation passing style async programming and Promises can co-exist. I love the way how Promises can be neatly combined with Generators and the semant

Re: Simplify async code-flows and unify unit tests

2013-05-07 Thread Joshua Cranmer 🐧
On 5/7/2013 8:49 AM, Mike de Boer wrote: I've told some of you before that I'm not a big fan of Promise libraries (if not, please read the 10 reasons to NOT use a Promise library: https://gist.github.com/mikedeboer/5305020). For what it's worth, I am very unpersuaded by your argumentation. R

Re: Simplify async code-flows and unify unit tests

2013-05-07 Thread Mark Hammond
On 7/05/2013 11:49 PM, Mike de Boer wrote: TLDR; in bug 867742 I requested to adopt two JS modules, Async.jsm and AsyncTest.jsm, in mozilla-central/toolkit/modules. The whole story can be read below as well as at https://gist.github.com/mikedeboer/5495405. I posted about this subject before on fi

Re: Simplify async code-flows and unify unit tests

2013-05-07 Thread Tetsuharu OHZEKI
For only making tests codes (mochitest), I think it's good that we introduce the way to write async test uniformly. However, I seem we need consider about it for some reason. 1. We have already task.jsm modules in our source tree. It's promises based design and it has been used in our code. the d