emacs-devel
[Top][All Lists]
Advanced

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

Re: Proper namespaces in Elisp


From: Daniel Colascione
Subject: Re: Proper namespaces in Elisp
Date: Sat, 9 May 2020 11:39:06 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

On 5/9/20 11:35 AM, João Távora wrote:
On Sat, May 9, 2020 at 7:32 PM Daniel Colascione <address@hidden> wrote:



On 5/9/20 11:23 AM, João Távora wrote:
On Sat, May 9, 2020 at 6:45 PM Daniel Colascione <address@hidden
<mailto:address@hidden>> wrote:


     Can you give a concrete example of a situation in which it'd be
     useful to
     do that? I think other people on the thread are right about
     discouraging
     bulk naked symbol imports.


For a submodule that you do control, it's not such a bad idea.

Concrete example? If you want inheritance, you can get it with EIEIO.

When writing a namespaced foo-tests.el library for your namespaced
foo.el library, for example.  Or for a big enough foo program, a foo-utils.el
that exports utils that only foo.el needs and noone else.

Why not just re-enter the same namespace in your test file then? What problem are you actually trying to solve here? If the problem is just package name prefix length, you can fix it with symbol rewriting without a ton of other complexity. I don't see a *need* for module inheritance or bulk imports or anything like that just to address the problem of symbol names being inconveniently long in source code.

EIEIO is Elisp's CLOS, AFAIK.  I use it, but don't know what it has to do with
namespacing.

It's a way of getting implementation inheritance. So is the module repackaging you're describing.



reply via email to

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