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

Re: "error" special form or procedure?



"felix" <felixundduni@xxxxxxxxxx> writes:

> 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.

agreed, it should be specified as a procedure.

> 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":

I think this is redundant.  most compilers probably provide _some_ way
to treat a keyword as a special form if possible, and treat it as a
variable reference otherwise.  you certainly can do such a thing using
syntax-case, for instance.

now if the SRFI _required_ that source location info be provided, then
I would completely agree with you.

-- 
You have a tendency to feel you are superior to most computers.