On 13 Apr 2009, at 18:11, Vyacheslav Akhmechet wrote:

> On Mon, Apr 13, 2009 at 10:21 AM, Pascal Costanza <[email protected]>  
> wrote:
>> The cl-cont webpage says that defgeneric and defmethod are currently
>> not supported.
> Yes, what I meant is that there is no defgeneric/cc and defmethod/cc.
> I had no need for them, and for reasons that I can't remember now
> writing a transformer for defmethod/cc was a little bit tricky (I
> don't think it was too tricky, I just didn't have a reason to spend
> the time writing it).

ok

>> However, if I understand correctly, it should be
>> possible to say this:
>>
>> (defmethod foo (...)
>>   (with-call/cc ...))
> Sure, that will work. But strictly speaking, it's not a "full"
> continuation, because, for example, (foo :after) will be lost. I think
> to get this working so that people don't encounter surprises most of
> the time is tricky.

ok, I can imagine.

>> If this is indeed supported, it can happen that an invocation of
>> call-next-method is implicitly captured in a continuation.
> I've never done anything like this, defun/cc is usually more than
> enough for me. I don't think it happens in Weblocks codebase. But of
> course this would also need to be worked out. I think there are some
> subtle issues here.

ok

>> P.S.: The cl-cont webpage also says that catch, throw, progv and
>> unwind-protect are not supported. It should be possible to make that
>> work with the first-class dynamic environments support in ContextL
>> (only in the repository version at the moment)...
> Cool! I'm not sure what the semantics would be for some of these
> constructs, I'd have to look into it in more detail. Hopefully someone
> else does it before I get the chance to :)

Essentially, ContextL now provides a dynamic-wind construct, so that  
you can say something like this:

(dynamic-wind
   (unwind-protect
       (proceed some protected code)
     (some cleanup code)))

...and then later do a (capture-dynamic-environment) such that you can  
reinstall such 'behavioral' dynamic bindings.

It's still in a somewhat experimental stage, I'm not 100% sure that  
everything works as it should. That's why I agree: Someone should do  
it, so that we all get feedback... ;)


Pascal

-- 
ELS'09: http://www.european-lisp-symposium.org/

Pascal Costanza, mailto:[email protected], http://p-cos.net
Vrije Universiteit Brussel
Programming Technology Lab
Artificial Intelligence Lab
Pleinlaan 2, B-1050 Brussel, Belgium





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"weblocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/weblocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to