From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: Dynamic modules: MODULE_HANDLE_SIGNALS etc. Date: Mon, 21 Dec 2015 17:21:18 +0600 Message-ID: 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 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1450696920 10724 80.91.229.3 (21 Dec 2015 11:22:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Dec 2015 11:22:00 +0000 (UTC) Cc: tzz@lifelogs.com, Emacs developers , Philipp Stephani , =?UTF-8?Q?Aur=C3=A9lien_Aptel?= , Eli Zaretskii , Daniel Colascione To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 21 12:21:59 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 1aAyXP-00025k-2l for ged-emacs-devel@m.gmane.org; Mon, 21 Dec 2015 12:21:59 +0100 Original-Received: from localhost ([::1]:44120 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAyXO-0007Td-GZ for ged-emacs-devel@m.gmane.org; Mon, 21 Dec 2015 06:21:58 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAyXA-0007TI-1p for emacs-devel@gnu.org; Mon, 21 Dec 2015 06:21:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aAyX6-0001CL-1Y for emacs-devel@gnu.org; Mon, 21 Dec 2015 06:21:43 -0500 Original-Received: from mail-lf0-x235.google.com ([2a00:1450:4010:c07::235]:34060) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAyX4-0001By-H3; Mon, 21 Dec 2015 06:21:38 -0500 Original-Received: by mail-lf0-x235.google.com with SMTP id y184so108797607lfc.1; Mon, 21 Dec 2015 03:21:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=CG2HyRqYinkmNyOHEpWFjHsbBtuWsgUajORkNpRUNv4=; b=TghuAogYSU0cMQFQV0m+oBNenUgBUzP/q+9HAludSk0Ru36d2Jpob7RZNm1e1bXu/p +R8a2mEwBaVKXH1wIntTUcc7dAoOwJFc5WCQcYC/aMJBVMMFLth5b6E5xuASHEnvAa5G M2lkdOPsz9JAJ2mTQmGPUqBFpD4BlBoPiCZk70tIXCjorOFvQoLNacdsiMLByq9xUmNA ETz0iHt5bAlYSz3uR28I7J/fIuCHbRRvopzcvv55iFmdvoBLD0776MWJqveTvzjhSEDk pZeYwr/ydRkExSBB7lfIyXRXCy4l+c++rQFep9u2xBFhMNH4qy50U3BmxrUXLd++el9/ 98Dg== X-Received: by 10.25.162.65 with SMTP id l62mr6172592lfe.64.1450696897528; Mon, 21 Dec 2015 03:21:37 -0800 (PST) Original-Received: by 10.112.129.163 with HTTP; Mon, 21 Dec 2015 03:21:18 -0800 (PST) In-Reply-To: <5677DBC9.6030307@cs.ucla.edu> X-Google-Sender-Auth: S8epRg99dE9PxyTYNirpxeBdii4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::235 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:196598 Archived-At: On Mon, Dec 21, 2015 at 5:00 PM, Paul Eggert wrote: > Come to think of it, there must be a better way for emacs-module.c to dea= l > with C++ exceptions. The current approach is complex, confusing and > error-prone. If emacs-module.c or the Emacs exception-handling mechanism > really needs to be rewritten in C++ in order to catch C++ exceptions nice= ly, > then somebody with C++ expertise should do that. (Optionally, of course; = it > should be OK to have a C-only Emacs that does not worry about C++ modules= .) > If done well, that should simplify the module interface considerably, for > both C and C++. 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?) 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. > If this simplification cannot be done, one possible workaround would be t= o > say that C++ modules should not use nontrivial destructors. This would be= a > different way to let us simplify emacs-module.c significantly, albeit a w= ay > that is less satisfactory for C++ modules. I=E2=80=99m lacking full context here; do you mean not using nontrivial destructors *at all*? This would amount to banning C++ as a possible module development language, as nontrivial, deterministically invoked destructors are its very essence.