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

[Scheme-reports] exception handling

A typo in draft-3:
  (merror message obj ...)
   Message should be a string.  raise on a new created ...

The sentence starting with "raise" is missing a verb.  Perhaps "Invokes"?

The example listed after error does not make use of error.

More fundamentally, the paradigm seems very awkward.  The classic
exception-handling idiom in a language with non-continuable exception
seems to require call-cc, which is rather painful:

   (lambda (done)
        (lambda (ex)
          (handle-exception ex)
          (done #f))
       (lambda ()

That's a lot of boiler-plate.
At least there should be some convenience syntax to make this less painful.
Kawa has try-patch:
This is somewhat Java-centric, but perhaps something like a cond-body 
for the
handler would work. For example:

   (try-catch                                    [Syntax]
       var ;; Bound to raised object
       (test body ...) ...)
	--Per Bothner
per@x   http://per.bothner.com/

Scheme-reports mailing list