On Mon 30 Jan 2012 07:39, Mark H Weaver <m...@netris.org> writes: > When 'error' is called, the user should _automatically_ be told the > exact source location where it was called, and the procedure that called > it should be present in the backtrace. Therefore, we should somehow > prevent it from being tail-called.
This is the argument behind R6RS's inclusion of "assert"; see section 11.14. > One idea is to change 'error' into a macro, and use tricks similar to > what 'load' does, to cleverly makes it look like a procedure. Unfortunately this is an incompatible change. Existing compiled files which reference the "error" binding expect it to be a procedure, not a macro. To provide this source information, a technique like this one might be applicable: http://funcall.blogspot.com/2009/05/you-knew-id-say-something-part-iv.html Until we do something to address this issue, we should probably document this aspect of the behavior of "error". Andy -- http://wingolog.org/