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

Compatibility with other SRFIs

This page is part of the web mail archives of SRFI 35 from before July 7th, 2015. The new archives for SRFI 35 contain all messages, not just those from before July 7th, 2015.

Although I wouldn't like to see a dependency on other SRFIs, I think a section treating compatibility with them would be useful. Perhaps something like the following after the "Standard Conditions" section?

--begin suggested section----------
Compatibility with other SRFIs:
SRFI-18, SRFI-21 and SRFI-23 define some standard conditions. If a Scheme implementation provides these SRFIs, it should use the following definitions:

For SRFI-18 and SRFI-21:
  (define-condition-type &join-timeout &condition
  (define-condition-type &abandoned-mutex &serious
  (define-condition-type &terminated-thread &condition
  (define-condition-type &uncaught &serious
    (reason uncaught-exception-reason))

For SRFI-23:
  (define-condition-type &srfi-23-error &error
    (reason srfi-23-error-reason)
    (args srfi-23-error-args))
  (define (make-error-exception r a)
    (make-condition &srfi-23-error reason r args a))
  (define (error reason . args)
    (raise (make-error-exception reason args))
--end suggested section----------
Darren Bane
PGP key available from keyservers or my .plan
Key ID: 2DA0C6EF.  Call me for the fingerprint.