[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Proper namespaces in Elisp
From: |
Richard Stallman |
Subject: |
Re: Proper namespaces in Elisp |
Date: |
Mon, 04 May 2020 22:51:32 -0400 |
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> And https://github.com/Malabarba/nameless/. I'm surprised that this
package hasn't seen more adoption. It's basically solved the namespacing
problem for me.
> It uses font-lock to shorten package prefixes: my-package-xyz gets
displayed as :xyz, my-package--abc gets displayed as ::abc, and other prefixes
can be added (by default font-lock-xyz gets displayed as fl:xyz).
Are you saying that this package implements _abbreviation_ for prefixes
in a totally determined way, with no searching of multiple namespaces?
It seems that way.
What causes problems with namespaces in Lisp is searching multiple
namespaces in series until one of them contains the desired symbol.
If the system does not do that, it might not cause a problem -- but it
won't do the same job that people expect.
I think this will cause the problems:
> Anyway, are there any contemporary objections to Nic's plan, in
> particular I am interested in knowing if there any any major objections
> to Nic's reader logic:
> - given a string X
> - lookup X in the local obarray
> - if it exists return the symbol
> - else
> - lookup X in the global obarray
> - if it exists return the symbol
> - else
> - add the symbol to the local obarray
Any scheme for searching namespaces at read time will work out badly.
Good results from namespaces require doing the search based on how the
symbol will be used in each occurrence.
--
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
Re: Proper namespaces in Elisp, Clément Pit-Claudel, 2020/05/04
- Re: Proper namespaces in Elisp, João Távora, 2020/05/04
- Re: Proper namespaces in Elisp, Helmut Eller, 2020/05/04
- Re: Proper namespaces in Elisp, Stefan Monnier, 2020/05/04
- Re: Proper namespaces in Elisp, João Távora, 2020/05/04
- Re: Proper namespaces in Elisp, Stefan Monnier, 2020/05/04
- Re: Proper namespaces in Elisp, João Távora, 2020/05/04
- Re: Proper namespaces in Elisp, Andrea Corallo, 2020/05/04
- Re: Proper namespaces in Elisp, João Távora, 2020/05/04
- Re: Proper namespaces in Elisp, Andrea Corallo, 2020/05/05