From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Dynamic modules: MODULE_HANDLE_SIGNALS etc. Date: Mon, 21 Dec 2015 03:34:34 -0800 Organization: UCLA Computer Science Department Message-ID: <5677E3CA.2000104@cs.ucla.edu> References: <83mvu1x6t3.fsf@gnu.org> <565779CD.80405@cs.ucla.edu> <83io4nuc68.fsf@gnu.org> <83r3iht93x.fsf@gnu.org> <838u4psznr.fsf@gnu.org> <56772054.8010401@cs.ucla.edu> <83zix4scgf.fsf@gnu.org> <5677DBC9.6030307@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1450697756 23985 80.91.229.3 (21 Dec 2015 11:35:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Dec 2015 11:35:56 +0000 (UTC) Cc: tzz@lifelogs.com, Emacs developers , Philipp Stephani , =?UTF-8?Q?Aur=c3=a9lien_Aptel?= , Eli Zaretskii , Daniel Colascione To: Yuri Khan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 21 12:35:47 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 1aAykk-0006kV-JE for ged-emacs-devel@m.gmane.org; Mon, 21 Dec 2015 12:35:46 +0100 Original-Received: from localhost ([::1]:44239 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAykj-00035p-VB for ged-emacs-devel@m.gmane.org; Mon, 21 Dec 2015 06:35:45 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37843) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAyjj-00021D-VP for emacs-devel@gnu.org; Mon, 21 Dec 2015 06:34:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aAyjj-0004Ej-3r for emacs-devel@gnu.org; Mon, 21 Dec 2015 06:34:43 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:52921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAyjd-0004C0-Dp; Mon, 21 Dec 2015 06:34:37 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id CFD631607C4; Mon, 21 Dec 2015 03:34:35 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id csiqP8hSlVdn; Mon, 21 Dec 2015 03:34:35 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 0D27A160D24; Mon, 21 Dec 2015 03:34:35 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id pQJ6OCxZY5wH; Mon, 21 Dec 2015 03:34:34 -0800 (PST) Original-Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id C8F781607C4; Mon, 21 Dec 2015 03:34:34 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 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:196599 Archived-At: Yuri Khan wrote: > On the Emacs side of the module API, Emacs should not have to > implement any special treatment for C++ exceptions. (Because if it > does, where do we draw the line? Should Emacs then handle any other > languages=E2=80=99 exceptions?) This approach would be fine, if we can figure out how to solve the=20 exception-handling problem. > A sane approach is to have a C-only API, and module developers who > want to write modules in other languages will devise their own > wrappers/adaptors to make interfacing with Emacs easier and less > error-prone. As part of its contract, such an adaptor shall prevent > any exceptions from crossing the module boundary. That sounds reasonable, and should simplify the module API, at least for=20 C-language modules. >> >If this simplification cannot be done, one possible workaround would = be to >> >say that C++ modules should not use nontrivial destructors. This woul= d be a >> >different way to let us simplify emacs-module.c significantly, albeit= a way >> >that is less satisfactory for C++ modules. > I=E2=80=99m lacking full context here; do you mean not using nontrivial > destructors*at all*? I'm lacking context too, but I suppose the answer might be "yes", or at l= east=20 "yes, unless you can guarantee by some other means that stack overflow ca= nnot=20 occur". Which does indeed sound unsatisfactory.