[Top][All Lists]

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

Re: adding namespaces to emacs-lisp (better elisp?)

From: Stefan Monnier
Subject: Re: adding namespaces to emacs-lisp (better elisp?)
Date: Fri, 26 Jul 2013 11:43:40 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> We had a lot of discussion recently about making EmacsLisp

I'm not sure I understand: do you mean Emacs does not Lisp enough yet?

> Here http://nic.ferrier.me.uk/blog/2013_06/adding-namespaces-to-elisp is
> a proposal to add namespaces to emacs-lisp.

- "Interning a symbol with "::" in it should no longer be possible.
  It should raise an error."  Why not simply intern it in the
  corresponding namespace?  It's probably a bad practice, but Emacs is
  usually not in the business of preventing bad practice.

- I'm not sure how well it will cope with shadowing and non-namespaced
  symbols (e.g. symbols like `face' that aren't used as variables).
  The rule "global obarray is inspected first and if a symbol is found
  there that's what is used" means that we have to be vary careful about
  interning things in the global obarray since it can affect the way
  other code is handled.  Currently, we're very liberal about interning
  in the global obarray.
  Basically I think this shadowing rule makes things a bit too automatic
  for something where we need more control.
  I think that, for backward compatibility reasons we can't easily mark
  "non-prefixed symbols that should be global" (such as `face'), so the
  safer alternative is to force local symbols to be specially marked
  (like ::foo, maybe, to mean "foo in the current local obarray").
  Having to prefix every single local symbol that way probably sounds
  rather unpalatable, tho.

- I'm not sure exactly how you expect importing namespaces
  should/will work.

-- Stefan

reply via email to

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