Mark H Weaver <m...@netris.org> writes: > However, catch/throw _will_ accept uninterned symbols created with > 'make-symbol'.
Personally, I like uninterned symbols much better. They can be a bit confusing in Lisp because they share print names, but one can't exactly say that they do in Guile: guile> (make-symbol "xxx") #<uninterned-symbol xxx b7838a10> guile> Which feels a bit like gensym-on-demand, except that the serialization happens by address rather than counting. > Here's a faster implementation of call/ec that uses (list 'call/ec) to > create prompt tags on Guile 2, and (make-symbol "call/ec") on earlier > versions of Guile: > > (cond-expand > (guile-2 (define (call-with-escape-continuation proc) > (let ((tag (list 'call/ec))) > (call-with-prompt > tag > (lambda () (proc (lambda xs (abort-to-prompt tag xs)))) > (lambda (k xs) (apply values xs)))))) > > (guile (define (call-with-escape-continuation proc) > (let ((key (make-symbol "call/ec"))) > (catch key > (lambda () (proc (lambda xs (throw key xs)))) > (lambda (key xs) (apply values xs))))))) > > (define call/ec call-with-escape-continuation) Given the constraints of current guile-1 and guile-2, I doubt that there is much to take away anymore from this solution. Thanks -- David Kastrup