[plt-scheme] Fun with Unicode and delimited continuations
On Jun 3, 2010, at 9:11 AM, Matthias Felleisen wrote:
>
> On Jun 3, 2010, at 12:06 PM, John Clements wrote:
>
>>
>> On Jun 3, 2010, at 7:03 AM, Matthias Felleisen wrote:
>>
>>>
>>> On Jun 3, 2010, at 9:58 AM, Doug Orleans wrote:
>>>
>>>> I think it's similar to using continuations in the web server, to avoid having to break up the flow of a procedure that needs to get information from the user.
>>>
>>> Not really. If you're writing programs not poetry (I do appreciate both!), you want continuation operators when you grab control at unpredictable points (e.g., timer events) or when you compose functions and the continuation is difficult or impossible to compute (e.g., if you used +/- many times).
>>
>> Am I naive to think of this use of delimited continuations as basically being a version of 'yield' with external control over the yield boundary?
>
> You can't do this with yield at all. Doug's poem computes two values -- as in multiple values -- with a single function body.
Sorry, maybe this wasn't clear: I mean e.g. the python 'yield', which allows a function to return multiple values in a serialized form.
The only problem with this mechanism is that the yield boundary is fixed on entry to the function call.
John
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4669 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20100603/67154557/attachment.p7s>