notes-computer-jasper-jasperNotesFiltered1

notes removed from jasperNotes* that i dont want to forget:


http://lambda-the-ultimate.org/node/4592

hmm, makes the interesting point that you need to ask the programmer to distinguish between a temporary yielding of control (to allow, e.g., nonblocking I/O), and an actual non-local exit, to allow dynamic-unwind-like-things (e.g. Python's try/finally blocks) to know when they need to run the finalizer. in general, of course, a coroutine might never have control returned to it, so when is the finalizer actually run?

perhaps we need a more complex generalization of a finalizer to go with handler trees and continuations.

how about, following RAII http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization , we make it like a destructor of the continuation object, that is, when a garbage-collection system garbage collects a continuation, it also runs any unrun finalizers on its call stack?

i like that...

it also fits in with the call that other commentators frequently make for a generic modular resource management/garbage-collection framework that can be applied to things other than memory.