Tuesday, May 03, 2005

Continuation

This is a new concept in programming, I'm still trying to comprehend the use of it. One good reference is Sam Ruby's Continuations for Curmudgeons. One obvious use of it is in iterators. C# 2.0 offers to 'yield' a result and maintain the state of an iterator.

My doubts on this are-
What is the scope of the continuation? Does a function that offers continuation keep track of caller's context like thread from which it is called or the object context of the caller?

An obvious use of continuations is in paging of database query results. This is kind of like an iterator, and can be a lot more useful. Again, the question is - if databases can support a continuation like this, don't they need to keep track of the caller application and other context information?

I will post more when I understand more.

No comments:

Guilt, Fear and their effects

A senior gentleman passed away early this morning near my place.  Nothing unusual about elderly people passing away.  His son was away in fo...