[Top][All Lists]

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

Re: Namespace macros (was: Generators (iterators) for Gnu Emacs)

From: Artur Malabarba
Subject: Re: Namespace macros (was: Generators (iterators) for Gnu Emacs)
Date: Mon, 8 Dec 2014 00:11:01 +0000

On 7 Dec 2014 15:40, "Helmut Eller" <address@hidden> wrote:
> On Sun, Dec 07 2014, Ted Zlatanov wrote:
> > I don't know Stefan's motives, but would love to see actual namespaces
> > in Emacs Lisp.  The closest thing I've seen is
> > https://github.com/Bruce-Connor/names which can be installed from the
> > GNU ELPA.  Perhaps that's an actual problem we keep ignoring because
> > it's easy to hack around it "just that once."
> Thanks for the pointer.
> I also wrote a namespace macro: https://github.com/ellerh/namespace.el
> Another one I know is: https://github.com/chrisbarrett/elisp-namespaces
> The experience with my own namespace macro was that it works fairly well
> when writing a library from scratch, in particular when the code
> consists mostly of functions and almost no quoted symbols.  If it works
> well, then the code looks a lot neater with namespaces.
> But it was also rather useless when I tried it to use it with the SLIME
> codebase.  The existing code uses prefixes in inconsistent ways and
> quoted symbols are needed surprisingly often.

Names.el partially solves that by namespacing sharp-quoted symbols as function names (you have to use the sharp-quote on function names for this to work, but that's good practice anyway). This catches the majority of the uses of quotes for me.

Quoted variable names are impossible to identify with certainty, so Names doesn't try to namespace them by default. But but it does offer the option to namespace regular quoted symbols as variable names.

reply via email to

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