domenic at domenicdenicola.com (2013-11-22T17:57:50.379Z)
Heck, why not just add async functions to the agenda?
There's:
- Promises, yay
- A well-establish use-case, which is awkward to implement without (as the original post demonstrates)
- Strong syntactic precedent with C#
- Strong semantic cowpath with TaskJS
- Strong developer interest
- A year to work out any kinks : )
By "async function", I mean something like:
```js
async function F(p1, p2, ...pN) {
await G();
}
```
which would de-sugar to something like:
```js
function F(...args) {
return Task.spawn(function(p1, p2, ...pN) {
(yield G());
}.bind(this, ...args));
}
```
With a [NoNewLine] after the "async" contextual keyword, obviously.
Low-risk, high-reward?
Heck, why not just add async functions to the agenda? There's: - Promises, yay - A well-establish use-case, which is awkward to implement without (as the original post demonstrates) - Strong syntactic precedent with C# - Strong semantic cowpath with TaskJS - Strong developer interest - A year to work out any kinks : ) By "async function", I mean something like: async function F(p1, p2, ...pN) { await G(); } which would de-sugar to something like: function F(...args) { return Task.spawn(function(p1, p2, ...pN) { (yield G()); }.bind(this, ...args)); } With a [NoNewLine] after the "async" contextual keyword, obviously. Low-risk, high-reward? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131116/9a72a395/attachment.html>