await on synchronous functions
Andreas Rossberg
rossberg at google.com
Thu Jul 23 13:06:02 UTC 2015
On 17 July 2015 at 23:39, Mark S. Miller <erights at google.com> wrote:
> On Fri, Jul 17, 2015 at 10:41 AM, Andrea Giammarchi <
> andrea.giammarchi at gmail.com> 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.
/Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150723/bb6805a4/attachment.html>
More information about the es-discuss
mailing list