domenic / promises-unwrapping

The ES6 promises spec, as per September 2013 TC39 meeting
1.23k stars 94 forks source link

Add shorthand "prose hooks" for performing various operations #21

Closed domenic closed 10 years ago

domenic commented 10 years ago

People seem confused, and want to know how they can do Promise.reject or Promise.all in their specs. It's pretty straightforward; you say:

Let x be the result of Promise.reject(r), using the initial value of Promise.reject.

But we may want to provide some easy phrases that are shorthand for this longhand. Here's what I can think of:

annevk commented 10 years ago
tabatkins commented 10 years ago

"be the first of" is extremely ambiguous in English - it sounds like it's just referring to p1 in a stupid way. I prefer Domenic's wording.

Same with "let p be all of ..." - sounds like it's just collecting them into a list or something. "waiting for all" it a little long, but it's clear and easy to remember, so I'm fine with it.

domenic commented 10 years ago

Added a guide with these plus some guidance and examples. Could probably use more examples; pull requests welcome in that department.