From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: Dynamic loading progress Date: Mon, 28 Sep 2015 20:09:49 +0000 Message-ID: References: <55DB7C3D.4090106@cs.ucla.edu> <55DE75FD.8020308@cs.ucla.edu> <55F5DD8C.70506@dancol.org> <55F62C16.4000105@dancol.org> <55F64F04.9030002@dancol.org> <55F6E43E.9030502@dancol.org> <55F70C4E.8030805@dancol.org> <560994F9.3030100@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bb0405826ba7d0520d44830 X-Trace: ger.gmane.org 1443488891 869 80.91.229.3 (29 Sep 2015 01:08:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Sep 2015 01:08:11 +0000 (UTC) Cc: =?UTF-8?Q?Aur=C3=A9lien_Aptel?= , Stephen Leake , Paul Eggert , Tom Tromey , Emacs development discussions To: Daniel Colascione , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 29 03:08:10 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 1ZgjOr-0005ka-2v for ged-emacs-devel@m.gmane.org; Tue, 29 Sep 2015 03:08:09 +0200 Original-Received: from localhost ([::1]:43455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgjOq-0005yD-B7 for ged-emacs-devel@m.gmane.org; Mon, 28 Sep 2015 21:08:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgekL-0006HQ-AB for emacs-devel@gnu.org; Mon, 28 Sep 2015 16:10:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZgekK-0004X1-6i for emacs-devel@gnu.org; Mon, 28 Sep 2015 16:10:01 -0400 Original-Received: from mail-wi0-x230.google.com ([2a00:1450:400c:c05::230]:37621) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgekJ-0004Wp-TQ for emacs-devel@gnu.org; Mon, 28 Sep 2015 16:10:00 -0400 Original-Received: by wicfx3 with SMTP id fx3so117064692wic.0 for ; Mon, 28 Sep 2015 13:09:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-type; bh=t3QZCCCgu+rrrAU7Fc4finue1vkw9fI6g6l5pJvDpO0=; b=Ls6YQ3UOtCyHG3sGkn8OGItqrGeCToe92H/Sd1NbjkSHwaE/jLL89GTUKOMG1t9elR UqDtnw4QzYvRkEkSNRr1XLB3uHslmJi/SBEPaI8c0JvSv/c6qDxTNphrwSL/jf0ulc6O X2psOa0h1fT0CjY5wDWJYvzB2eXs3p7KW6nphKEHn9Bx3z7s0qbZhLcGuy7dweJRR1i3 mSuYc99+OAF6rnT6vZ1ZbpSKt1aIE3j6+f2R/88j+cpdIncbBaNUWrgLQrKz6bRLNX8/ v5wUInu0dZvTai8ygPqMT5uqpUUSyqEV27UtwKds/sw82aIZczRUM2KQ5ovXl8FZP84N XK5Q== X-Received: by 10.194.82.198 with SMTP id k6mr23613513wjy.139.1443470999204; Mon, 28 Sep 2015 13:09:59 -0700 (PDT) In-Reply-To: <560994F9.3030100@dancol.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::230 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:190458 Archived-At: --047d7bb0405826ba7d0520d44830 Content-Type: text/plain; charset=UTF-8 Daniel Colascione schrieb am Mo., 28. Sep. 2015 um 21:29 Uhr: > On 09/28/2015 08:25 AM, Philipp Stephani wrote: > > > > > > Stefan Monnier > > schrieb am Di., 15. Sep. 2015 um > > 02:55 Uhr: > > > > Just, FWIW we can keep talking about it, but my opinion is quite > firmly > > made. I want the first API to provide access to the "naked" > primitives > > with no condition-case wrapping. > > > > > > This is wrong and dangerous. It makes dynamic loading far less useful > > than it could be. Essentially modules e.g. written in C++ will have to > > consist of a small C shim that makes IPC calls to some out-of-process > > server. > > While I agree that making non-local exits part of the public API is a > titanic footgun and a mistake we'll regret for decades, it's not the > case that it forces non-C modules to use IPC shims. Emacs non-local > unwinding stops at the first matching condition_case on the stack, so as > long there's a condition-case frame between a stack frame that can't be > unwound with longjmp (say, one with C++ destructors) and the Emacs core, > the program will work correctly if Emacs longjmps. > The issue is that it's impossible for module authors to write such a `condition-case' in the general case. While individual signals can be caught, it's not possible to catch all signals using the condition-case Lisp function. Similarly, there is no way to write a `catch' block that would catch all tags; `catch' only allows catching individual tag symbols. > > Non-local returns are awful, yes, but they do not make it impossible to > integrate non-C languages with Emacs. > > --047d7bb0405826ba7d0520d44830 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Daniel= Colascione <dancol@dancol.org&= gt; schrieb am Mo., 28. Sep. 2015 um 21:29=C2=A0Uhr:
On 09/28/2015 08:25 AM, Philipp Stephani wrote:
>
>
> Stefan Monnier <monnier@iro.umontreal.ca
> <mailto:monnier@iro.umontreal.ca>> schrieb am Di., 15. Sep. 2015 um > 02:55 Uhr:
>
>=C2=A0 =C2=A0 =C2=A0Just, FWIW we can keep talking about it, but my opi= nion is quite firmly
>=C2=A0 =C2=A0 =C2=A0made.=C2=A0 I want the first API to provide access = to the "naked" primitives
>=C2=A0 =C2=A0 =C2=A0with no condition-case wrapping.
>
>
> This is wrong and dangerous. It makes dynamic loading far less useful<= br> > than it could be. Essentially modules e.g. written in C++ will have to=
> consist of a small C shim that makes IPC calls to some out-of-process<= br> > server.

While I agree that making non-local exits part of the public API is a
titanic footgun and a mistake we'll regret for decades, it's not th= e
case that it forces non-C modules to use IPC shims. Emacs non-local
unwinding stops at the first matching condition_case on the stack, so as long there's a condition-case frame between a stack frame that can'= t be
unwound with longjmp (say, one with C++ destructors) and the Emacs core, the program will work correctly if Emacs longjmps.
The issue is that it's impossible for module authors to wri= te such a `condition-case' in the general case. While individual signal= s can be caught, it's not possible to catch all signals using the condi= tion-case Lisp function. Similarly, there is no way to write a `catch' = block that would catch all tags; `catch' only allows catching individua= l tag symbols.
=C2=A0

Non-local returns are awful, yes, but they do not make it impossible to
integrate non-C languages with Emacs.

--047d7bb0405826ba7d0520d44830--