From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Rottmann Newsgroups: gmane.lisp.guile.devel Subject: Re: R6RS exception printing at the REPL Date: Thu, 02 Dec 2010 21:21:55 +0100 Message-ID: <8762vc0vto.fsf@delenn.lan> References: <87sjzvnu1i.fsf@delenn.lan> <87tyjbkger.fsf@delenn.lan> <87ipzj631y.fsf@delenn.lan> <87zkspulx5.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1291321339 10693 80.91.229.12 (2 Dec 2010 20:22:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 2 Dec 2010 20:22:19 +0000 (UTC) Cc: guile-devel@gnu.org To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Dec 02 21:22:15 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1POFfT-0006QP-8B for guile-devel@m.gmane.org; Thu, 02 Dec 2010 21:22:15 +0100 Original-Received: from localhost ([127.0.0.1]:52099 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POFfS-00013Q-Nb for guile-devel@m.gmane.org; Thu, 02 Dec 2010 15:22:14 -0500 Original-Received: from [140.186.70.92] (port=41787 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POFfO-0000zP-HE for guile-devel@gnu.org; Thu, 02 Dec 2010 15:22:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POFfN-0002Vr-46 for guile-devel@gnu.org; Thu, 02 Dec 2010 15:22:10 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:46548 helo=mail.gmx.net) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1POFfM-0002Uz-Om for guile-devel@gnu.org; Thu, 02 Dec 2010 15:22:09 -0500 Original-Received: (qmail invoked by alias); 02 Dec 2010 20:22:05 -0000 Original-Received: from 83-215-154-5.hage.dyn.salzburg-online.at (EHLO nathot.lan) [83.215.154.5] by mail.gmx.net (mp067) with SMTP; 02 Dec 2010 21:22:05 +0100 X-Authenticated: #3102804 X-Provags-ID: V01U2FsdGVkX18HCQ4+cCYHqU/25H3+Ic99ytimSz3umse4jXRbzE mRLruA3oBtZe5J Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by nathot.lan (Postfix) with ESMTP id AE7713A695; Thu, 2 Dec 2010 21:22:00 +0100 (CET) Original-Received: from nathot.lan ([127.0.0.1]) by localhost (nathot.lan [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4vFvRSKMJdOr; Thu, 2 Dec 2010 21:21:56 +0100 (CET) Original-Received: from delenn.lan (delenn.lan [192.168.3.11]) by nathot.lan (Postfix) with ESMTP id 56D453A693; Thu, 2 Dec 2010 21:21:56 +0100 (CET) Original-Received: by delenn.lan (Postfix, from userid 1000) id 211102C0083; Thu, 2 Dec 2010 21:21:56 +0100 (CET) In-Reply-To: <87zkspulx5.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Thu, 02 Dec 2010 00:13:10 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:11230 Archived-At: ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Hello there! > > Andy Wingo writes: > >> On Sat 27 Nov 2010 01:08, Andreas Rottmann writes: >> >>> to not lose current functionality, `print-exception' and exception >>> printer procedures would need a `frame' argument as well, right? >> >> I guess. I never liked that, though; sounds like a needless tangling of >> concerns. What does having the frame give us? Just source, or the >> function name, or what? It seems like a message about the context in >> which the error occurred could just as well come before the error is >> printed out. >> >> What do you think? What does Ludovic think? :) > > I don=E2=80=99t think, actually. :-) > > Well, at first I thought exception printers could be nice. Currently, > there=E2=80=99s a single exception printer, which makes assumptions about= the > arguments to =E2=80=98throw=E2=80=99. Namely, it expects (throw KEY FUNC= FORMAT-STRING > FORMAT-ARG ...), or something like that. When that is honored, > exceptions are displayed in a human-readable way, otherwise they are > (very) badly printed, which could be improved. > Well, the point is that for R6RS and SRFI-34 exceptions, this convention is never honored, and it makes perfect sense IMO to introduce a mechanism that allows Guile to deal with alternative conventions already present in its code base. > OTOH, exceptions are a programming mechanism, not a UI mechanism, so one > could argue that it=E2=80=99s up to the application to define how to pres= ent > exceptions to the user. > AFAIU, the proposed API is there to influence the presentation of exceptions that are _not_ handled by the application. The achieved better representation of exceptions is a convinience for developers, and not something that should make a difference for the user of a Guile-based application, in the absence of any bugs in said application. If there is a bug, however, and thus an exception escapes to Guile's exception handler, a better presentation will allow for better bug reports (again, a convinience for the developer). > I think I=E2=80=99m slightly skeptical about system-wide exception printe= rs > because of this, and also because system-wide settings are evil. > I somewhat share that sentiment -- the global registry feels a bit awkward; perhaps it should be stored in a fluid? Also, I'd rather have the proposed API be Guile-internal, but I don't know how to properly achieve that. Regards, Rotty --=20 Andreas Rottmann --