"Julian Graham" <[EMAIL PROTECTED]> 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 doing: (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. Regards, Neil _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel