From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Dynamic modules: emacs-module.c and signaling errors Date: Thu, 26 Nov 2015 15:11:25 -0500 Message-ID: References: <83k2p7xk13.fsf@gnu.org> <87wpt7p369.fsf@tromey.com> <83d1uzxgvw.fsf@gnu.org> <5654D7CF.90001@cs.ucla.edu> <87si3vox7j.fsf@tromey.com> <56555B52.3030703@cs.ucla.edu> <837fl6xa02.fsf@gnu.org> <5655F10D.9080805@cs.ucla.edu> <83vb8ovkc5.fsf@gnu.org> <83a8q0vgb9.fsf@gnu.org> <83si3stuzn.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT X-Trace: ger.gmane.org 1448568721 7397 80.91.229.3 (26 Nov 2015 20:12:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Nov 2015 20:12:01 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 26 21:11:51 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a22tR-0002TS-72 for ged-emacs-devel@m.gmane.org; Thu, 26 Nov 2015 21:11:49 +0100 Original-Received: from localhost ([::1]:53030 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a22tT-00041c-Dv for ged-emacs-devel@m.gmane.org; Thu, 26 Nov 2015 15:11:51 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a22tH-00041E-Jh for emacs-devel@gnu.org; Thu, 26 Nov 2015 15:11:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a22tG-0005dh-Mg for emacs-devel@gnu.org; Thu, 26 Nov 2015 15:11:39 -0500 Original-Received: from relais.videotron.ca ([24.201.245.36]:62050) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a22tC-0005c0-Ss; Thu, 26 Nov 2015 15:11:34 -0500 Original-Received: from fmsmemgm.homelinux.net ([24.203.171.22]) by VL-VM-MR003.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0NYF0039QUR1GVD0@VL-VM-MR003.ip.videotron.ca>; Thu, 26 Nov 2015 15:11:25 -0500 (EST) Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 9187BAE06E; Thu, 26 Nov 2015 15:11:25 -0500 (EST) In-reply-to: <83si3stuzn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 24.201.245.36 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:195313 Archived-At: >> Because this loses the connection between the signal and its origin. > Not really, it doesn't. You get the same Lisp error you'd get in > Emacs proper. That's only the signal, not its origin. Its origin is lost. >> Because it imposes a cost which we may not want to pay. > What cost is that? Catch and then rethrow. Which is pure cost with no benefit, if you ask me. >> The current "funcall" should be renamed to "safe_funcall", and a new >> "funcall" should be provided which does not catch signals. > I still think we should be pragmatic about that, not radical. That's exactly what I am. The straightforward code doesn't catch&rethrow, so rather than let people do funcall_without_catch by testing if the not_so_plain_funcall has caught a signal and then rethrow it, it makes a boat load more sense to do it the other way around and let those who need the signals to be caught to request explicitly the not_so_plain_funcall. > If the cake can be had and eaten, too, why not? I'm fine with having both funcalls available. I just want to have the "raw" funcall advertized at least as much as the other, and the other one built on top rather than the other way around. I actually find it difficult to believe I have to argue this point. It's so blindingly obvious from a simple engineering perspective, not to mention the decades of experience with using a "raw non-catching funcall" from Emacs's C code. Stefan