On Thu, Jul 23, 2015 at 9:06 AM, Andreas Rossberg <[email protected]> wrote:
> On 17 July 2015 at 23:39, Mark S. Miller <[email protected]> wrote: > >> On Fri, Jul 17, 2015 at 10:41 AM, Andrea Giammarchi < >> [email protected]> wrote: >> >>> If I might, if there's one thing that has never particularly shone in >>> JS, that is consistency. >>> >>> I see only two possibilities here: 1) it throws with non Promises 2) it >>> "Promisify" anything that's not a Promise as if it was a >>> `Promise.resolve(1)` ... but since there's too much magic in the second >>> point, I'd rather stick with the first one. >>> >> >> Definitely #2. Had #1 been proposed, async/await never would have >> achieved consensus. >> > > Wait, what?? Oh no, please don't bake that sloppy craze deeper into the > language! Implicit conversions are Not Good. > Out of curiosity, can you give an example of the Not Good parts? ISTM the `await` prefix is more of an explicit cast than an implicit conversation, and other than the very small timing gap in how throws are handled I pointed out a few days ago, I can't think of any situations where a throw would make more sense than casting values to promises.
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

