emacs-devel
[Top][All Lists]
Advanced

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

Re: Dynamic loading progress


From: Philipp Stephani
Subject: Re: Dynamic loading progress
Date: Mon, 19 Oct 2015 22:38:17 +0000

Philipp Stephani <address@hidden> schrieb am Fr., 16. Okt. 2015 um 01:15 Uhr:
I just realized that we need (at least) one more public environment function, either "null" or "eq". Otherwise conditions cannot be written in module code.
I'd vote for bool is_not_null, it seems to be the most basic one, and doesn't invert the condition.

There are still a few open questions:
  1.  How to represent throw/catch. Currently it's not possible to throw from modules, but that should change because otherwise modules can't be transparent. For example, the following couldn't work:

    emacs_value top_level = env->intern(env, "top-level");
    if (!top_level) return NULL;
    return env->funcall(env, top_level, 0, NULL);

    because `top-level' uses `throw'.
    There are several ways to represent `throw'. My suggestion would still be to use an enum instead of the bool value for get_error and check_error. Otherwise the fact that a `throw' has happened has to be encoded somehow in the error symbol, which to me seems rather hackish and not future-proof. (What happens if Emacs would ever allow to signal a list?)
  2. Whether type_of should return an enum or a symbol. I'd vote for the symbol, as in Daniel's original design.
  3. Can runtime->get_environment ever fail?
  4. Some of the function (free_global_ref, the int/float extractors) don't return emacs_value and have no clear way to signal an error. For these function the caller always has to use check_error/get_error. Is that good enough?

reply via email to

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