[Seaside-dev] thoughts on partial continuations

Julian Fitzell jfitzell at gmail.com
Wed Feb 4 17:59:35 UTC 2009


On Wed, Feb 4, 2009 at 6:04 PM, Paolo Bonzini <bonzini at gnu.org> wrote:

>
> >> 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't think of any case when you would want an ensure block *inside* a
> >> callback to be unwound on a #call:. Can you?
> >
> > No. I can't even think of a case where you would want an #ensure:
> > within the definition of a flow.
>
> Neither do I.  Mixing #ensure: and continuations is a sure way to get
> either leaks or doubly released objects (which means either exceptions,
> or bugs too-much-reminding-of-C).
>

That seems like "conventional wisdom" to me again. Obviously you can run
into problems depending on what you put in your ensure block. But I don't
yet see that:

self inform: 'foo'.
self releaseAnObject

is any less likely to cause doubly released objects than

[self inform: 'foo'] ensure: [self releaseAnObject]

Julian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside-dev/attachments/20090204/26c01fd9/attachment.htm


More information about the seaside-dev mailing list