emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamic loading progress


From: Eli Zaretskii
Subject: Re: Dynamic loading progress
Date: Fri, 13 Feb 2015 18:55:45 +0200

> Date: Fri, 13 Feb 2015 08:20:09 -0800
> From: Daniel Colascione <address@hidden>
> CC: address@hidden, address@hidden
> 
> > Sorry, I don't share your optimism about the stability of their ABI.
> 
> My optimism is rooted in reality.

So is mine.  I guess our experiences differ.

> w32-win.el isn't that bad, especially for a module that loads quite a
> few different image libraries.

It's not bad when you get it ready.  But the effort it took to find
out which versions changed ABI, to design the way of testing that, and
to have all the #ifdef's in Emacs core to support all of those
versions, and continue maintaining that as new versions arrive, is
anything but trivial, take it from someone who did most of that.

> Besides: using modules tightly coupled to the Emacs core doesn't
> actually help. Instead of elisp coupled to one module's stable ABI, you
> have a piece of native code tightly coupled not only to that module's
> stable ABI, but _also_ to the volatile Emacs internal ABI. As jwz would
> say, now you have two problems.

No, we have only one problem: design and implement a minimal set of
APIs necessary for modules to work, and keep it minimal.  All the rest
is the problem of module developers.

It makes little sense to me to turn the table and make module
compatibility something that core developers need to take care of.

> > And we didn't yet start talking about problems with passing FILE
> > pointers and malloc'ed buffers between Emacs and the modules.
> 
> You have that problem anyway: a tightly-bound Emacs module for bridging
> the Emacs core and some third-party library would have to link against
> _some_ libc, and unless both the Emacs core and the third-party library
> used the same libc, you'd lose.

A well-designed set of APIs between Emacs and modules will avoid this
and other similar problems.  This has already been done at least
twice, in 2 different ways: in Make and in Gawk.  I see no reason why
Emacs couldn't do something similar to one of those methods.

> A better idea is not to pass C runtime objects between dynamically
> loaded components.

Exactly.  But this requires the set of APIs I'm talking about to
support this without making non-trivial modules impossible.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]