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?
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss