<div class="gmail_quote">On Wed, Feb 4, 2009 at 3:58 PM, Lukas Renggli <span dir="ltr">&lt;<a href="mailto:renggli@gmail.com">renggli@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">
</div>I don&#39;t think that this is related with the use of partial<br>
continuations, because there is exactly the same problem with full<br>
continuations.</blockquote><div><br>It&#39;s not specifically related to *partial* continuations, no. It&#39;s related to using an exception to abort the callback after suspending it with #call: (which we currently do with a partial continuation). #call: is using continuations anyway. Why does it need to use an exception together with a continuation to do its job? <br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Continuations (no matter what kind) and unwind blocks don&#39;t mix<br>
together. Should ensure blocks be unwound at all? When should they be<br>
unwound? How many times should they be unwound? You can change these<br>
property in the continuation and it probably solves this problem, but<br>
opens a bunch of other problems for sure. The only reasonable position<br>
to decide when to unwind is within the unwind block itself. I suggest<br>
not to go into that direction and just keep it with common wisdom:<br>
unwind blocks and continuations don&#39;t mix well.</blockquote><div><br>I&#39;m not talking about some some super-generic answer to how ensure blocks and continuations should mix in every case. I&#39;m talking about a very specific case, which is the implementation of user callbacks in Seaside. This is an interesting area of discussion (at least I find it interesting) and if we kept with the common wisdom, Seaside never would have been created in the first place. I&#39;m not suggesting I have the answer all worked out but there&#39;s no reason to believe that &quot;the way things are&quot; is the best they could possibly be.<br>
<br>Think about the semantics here for a minute: the whole concept of doing a #call: is that your callback is suspended, to be resumed later. I currently can&#39;t think of any case when you would want an ensure block *inside* a callback to be unwound on a #call:. Can you?<br>
<br>Julian<br></div></div>