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

Re: "error" special form or procedure?

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

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

I followed the discussion, and now I am again leaning towards
making error an ordinary procedure.

An additional point I think is worth making is that only having
a source location isn't that useful anyway, especially when
code is written using lots of higher order functions.
More useful would be a full stack trace. But for that, special
machinery is needed anyhow, and making error a special form
doesn't help much.

> >  you certainly can do such a thing using syntax-case, for instance.
> This might be a stupid question, but how does it (syntax-case)
> does that?

It appears to me that this is not possible.
It depends on what happens when a macro is encountered
in non-function position, and R5RS is a bit vague on this point.