emacs-devel
[Top][All Lists]
Advanced

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

Re: Dynamic loading progress


From: Stefan Monnier
Subject: Re: Dynamic loading progress
Date: Mon, 28 Sep 2015 15:39:45 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> There are some documentation frameworks available, e.g. Doxygen.
> It might be a good idea to use one of them instead of trying to define
> your own syntax.

Using doxygen sounds like a good idea.

Since the only thing we really need to formalize is the place and format
of the "compiled" docstrings (e.g. "a DOC file"), there could even be
several tools available which allow placing the docstring in various
ways in the source code.  And each module could use the tool it prefers.

> I still don't understand why we need finalizers.  Using finalizers in
> languages without deterministic garbage collection is generally an
> antipattern.

Maybe that's "generally" the case, but when you need to interface a GC'd
language with a manually-managed library, it's the standard technique
(and pretty much only/best).

The finalizer of course has to be "invisible".  Typically, it will do
nothing more than call "free" (or something equivalent) on a few objects.

> What is the use case for this? Is the "user_ptr" functionality really
> needed?

Think of a module which tries to provide bignums to Elisp via GMP.
It'll need to provide the new "bignum" objects, and they'll be
internally represented as GMP objects (which are manually
allocated/freed).  So it has to define a new Lisp_Object type, and some
of its fields are not Lisp_Objects but some pointer to an internal
thingy that needs to be freed iff the Lisp_Object is reclaimed.


        Stefan



reply via email to

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