guile-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Prevent 'error' from being tail-called, for better diagnosti


From: Andy Wingo
Subject: Re: [PATCH] Prevent 'error' from being tail-called, for better diagnostics
Date: Mon, 30 Jan 2012 12:05:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

On Mon 30 Jan 2012 07:39, Mark H Weaver <address@hidden> 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/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]