On 21/10/2011, at 21:23, Dean Landolt wrote:
> On Fri, Oct 21, 2011 at 3:20 PM, Jorge <[email protected] wrote:
>> On 21/10/2011, at 17:40, Eric Jacobs wrote:
>>> 
>>>  Jorge,
>>> 
>>>  Would it still be satisfying to you if instead of writing the call 
>>> expression like this:
>>>  try {
>>>    response = asyncFunction(request); //might suspend execution
>>>  }
>>>  catch (e) {
>>>    //whatever
>>>  }
>>>  //our code continues here
>>>  we needed to write it with an explicit annotation, like this:
>>> 
>>>  response = yield asyncFunction(request); //might suspend execution
>>> 
>>> 
>>>  or perhaps this:
>>> 
>>>  yield { response = asyncFunction(request); } //might suspend execution
>>> 
>>> 
>>>  or some other creative way of statically encoding the "might suspend 
>>> execution" condition into the syntax?
>> 
>> Yes, of course, it would be fine. Why ?
> 
> Because this is the fundamental difference between shallow and deep 
> continuations.

Yes, if we can write this:

 try {
   response = yield asyncFunction(request); //might suspend execution
 }
 catch (e) {
   //whatever
 }

and asyncFunction can suspend/resume then it's alright.

Why ?
-- 
Jorge.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to