guile-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] R6RS-style block comments


From: Neil Jerram
Subject: Re: [PATCH] R6RS-style block comments
Date: Wed, 07 Oct 2009 22:46:23 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Andy Wingo <address@hidden> writes:

> Oh man, at some point we have some pain coming, switching to
> srfi-35/r6rs exceptions. We mentioned it in August and decided to punt
> indefinitely -- though should someone be interested, help would be
> welcome ;-)

Yeah, we should do that.  Here's an outline design.

- Core concept is that libguile exceptions are srfi-34/srfi-35 objects.
  (I haven't yet checked for detailed changes between srfi-34/srfi-35
  and r6rs.  Are there any?)

- Back compatibility with traditional (key . args) information is
  achieved by having fields in the exception object that carry this
  information.

- There is a new most-fundamental primitive for raising an exception,
  say scm_primitive_raise, which can take both 34/35 type+fields, and
  the traditional (key . args), and constructs a 34/35 object that
  encapsulates all that.

- throw maps on to scm_primitive_raise with an `unspecified throw'
  34/35 type.

- error maps on to scm_primitive_raise with an `unspecified error'
  34/35 type.

- libguile-generated errors/exceptions map on to scm_primitive_raise
  with the most appropriate srfi-35 type, fields for that type, and the
  traditional (key . args) info.

- libguile's primitive exception-handling is modified so that it just
  calls the handler with the scm_primitive_raise object -
  i.e. implements the semantics of with-exception-handler.

- catch and scm_*_catch_* are modified so that they wrap the supplied
  handler procs in a wrapper that extracts the traditional (key . args)
  from the raise object, and passes those to the handler proc.

How does that sound?  Have I missed any important details?

Regards,
        Neil




reply via email to

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