[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: srfi-18 requirements

From: Neil Jerram
Subject: Re: srfi-18 requirements
Date: Tue, 04 Dec 2007 22:29:31 +0000
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

"Julian Graham" <address@hidden> writes:

> Hi Ludovic,
> I'm almost finished making the changes -- in fact, I've got everything
> fixed except for this one:
>> I'd use pairs or records for exception objects rather than just symbols
>> since symbols can always be forged. 

They can't be forged if you use a non-interned symbol: (make-symbol
"srfi-18").  I had this in mind, for the same reason, for srfi-34.scm,
I'm not sure now why that didn't happen.  Possibly because I wasn't
completely sure whether it was the Right Thing to exclude someone

(catch 'srfi-34
       (lambda ()
         (raise obj)
       (lambda (key obj)

>> So we'd have, e.g.:
>>   (define uncaught-exception?
>>     (let ((exception-type (cons 'uncaught-exception #f)))
>>       (lambda (obj)
>>         (and (pair? obj)
>>              (eq? (car obj) exception-type)))))
> The thing is, I can't throw with a key that's not a symbol.  I've been
> trying to rig up something using SRFI-34-style exceptions (key =
> 'srfi-34, args = anything) -- provided I can make that work, would
> that be okay?

It's a bit of pain that srfi-18 doesn't refer forward to srfi-34/35.
Obviously the exception system of srfi-18 is very _like_ that of
srfi-34/35, but srfi-18 doesn't say whether its exceptions have to be
implemented using srfi-34/35.

I guess that doesn't actually matter, though.  srfi-18 simply
requires its exception primitives to be implemented somehow.  If it
works semantically for them to be implemented using srfi-34/35, I
think it would make good sense for us to do that.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]