"error" special form or procedure? felix 27 Mar 2001 10:41 UTC

I think it should be made explicit wether "error" is a
special form or procedure. The spec calls it a procedure first and
later says it's a "procedure or special form".
Things like

(define my-error-handler (make-parameter error))

are of course not possible with a special form. One also
can not use "apply" on it.
But a special form (as Marc Feeley has pointed out)
could make the location in the source file available
for diagnostics. I would propose an additional special
form that can invoke the procedure "error":

(define-syntax signal-error
  (syntax-rules ()
    ((_ msg arg1 ...) (error msg arg1 ...)) ) )

An implementation can then use whatever mechanism it
has to provide the current line-number and/or source file.
("signal-error" is admittedly not very good. But I couldn't think of
anything else)

cheers,
felix