From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Reporting Lisp errors in dynamic modules Date: Fri, 27 Nov 2015 19:39:45 +0200 Message-ID: <83zixzqr32.fsf@gnu.org> References: <83egfbsnu2.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1448646015 20730 80.91.229.3 (27 Nov 2015 17:40:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 Nov 2015 17:40:15 +0000 (UTC) Cc: aurelien.aptel+emacs@gmail.com, tzz@lifelogs.com, dancol@dancol.org, emacs-devel@gnu.org To: Philipp Stephani Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 27 18:40:05 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 1a2N08-0001kX-KN for ged-emacs-devel@m.gmane.org; Fri, 27 Nov 2015 18:40:04 +0100 Original-Received: from localhost ([::1]:57902 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2N0B-0004nS-Fw for ged-emacs-devel@m.gmane.org; Fri, 27 Nov 2015 12:40:07 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2N08-0004nC-7H for emacs-devel@gnu.org; Fri, 27 Nov 2015 12:40:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a2N04-0004or-Nt for emacs-devel@gnu.org; Fri, 27 Nov 2015 12:40:04 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:44190) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2N04-0004ok-Fp for emacs-devel@gnu.org; Fri, 27 Nov 2015 12:40:00 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NYH00H00ID0XH00@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Fri, 27 Nov 2015 19:39:58 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NYH00HP3IELX800@a-mtaout23.012.net.il>; Fri, 27 Nov 2015 19:39:58 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.175 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:195396 Archived-At: > From: Philipp Stephani > Date: Fri, 27 Nov 2015 16:40:23 +0000 > Cc: aurelien.aptel+emacs@gmail.com, tzz@lifelogs.com, dancol@dancol.org > > I believe the line with "" is suboptimal, in that it > looks alien and includes all kinds of unneeded and weirdly formatted > data. AFAIU, the reason is that we deliberately unintern module-call. > Should we perhaps reconsider that decision, so that the backtrace is > in more familiar form? What exactly are the dangers of having > module-call exposed as any other primitive? > > > - Somebody calls it with the wrong type. Right now it doesn't do any type > checking, so that would crash/be UB. We can add checks to countermand that. > - An existing function outside of Emacs might already be called like that. Not really a problem, IMO. > Those are really minor issues, but since module-call is unusable from Lisp or > module code anyway, I've decided to avoid them by uninterning it. If type > checking is added and the name clash issue is consider minor, interning it is > fine. OK, I will see what I can do, thanks. > A cleaner approach would be to define module functions as separate kind of > function object. I think right now we have lists (Lisp closures and lambdas), > subrs, and bytecode objects, module functions could be a fourth type. But that > would require more thorough changes. Yes, indeed.