[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Proper namespaces in Elisp
From: |
João Távora |
Subject: |
Re: Proper namespaces in Elisp |
Date: |
Tue, 5 May 2020 13:50:11 +0100 |
On Tue, May 5, 2020 at 11:34 AM Andrea Corallo <address@hidden> wrote
> Here is a first simple implication of namespace at read-time:
>
> #+SRC_BEGIN lisp
>
> (make-package :xxx)
> (in-package :xxx)
> (defun foo () 'aaa)
> (export 'foo)
>
> (make-package :yyy)
> (in-package :yyy)
> (use-package :xxx)
>
> (if (not (eq (foo) 'aaa))
> (print "boom"))
>
> #+END_BEGIN
>
> This is because foo is not returnig 'aaa' but 'xxx::aaa'.
Andrea, this makes no sense. How is that different
from Elisp where foo returns 'xxx--aaa and yyy.el checks
for 'yyy-aaa? Because _that's_ what that program means,
except, because it is written in a properly namespaced
Lisp, it does it with fewer chars, is DRY, not WET.
Or don't you think packages should be allowed internal
symbols at all. Maybe you don't, but that's a question of
making a package system with the -- IMO quite ill-advised --
option to auto-exporting everything. It's _not_ an implication
of the reader-based approach in any way.
Or did you mean you want an auto-exported,
self-evaluating, quick-to-type, one-big-namespace
qualifier? The keyword package is there for that, as
you probably know, and that's what everybody uses.
_When_ they want those semantics. So, for me,
being able to determine the semantics of my program
(also called "programming") with little typing is a very
good thing, a very good "implication", it's exactly the
power I crave.
João
- Re: Proper namespaces in Elisp, (continued)
- 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
- Re: Proper namespaces in Elisp, Andrea Corallo, 2020/05/05
- Re: Proper namespaces in Elisp,
João Távora <=
- Re: Proper namespaces in Elisp, Andrea Corallo, 2020/05/05
- Re: Proper namespaces in Elisp, João Távora, 2020/05/05
- Re: Proper namespaces in Elisp, Andrea Corallo, 2020/05/05
- Re: Proper namespaces in Elisp, João Távora, 2020/05/05
- Re: Proper namespaces in Elisp, Andrea Corallo, 2020/05/05
- Re: Proper namespaces in Elisp, João Távora, 2020/05/05
- Re: Proper namespaces in Elisp, Andrea Corallo, 2020/05/06
- Re: Proper namespaces in Elisp, João Távora, 2020/05/06
- Re: Proper namespaces in Elisp, Andrea Corallo, 2020/05/07
- Re: Proper namespaces in Elisp, Stefan Monnier, 2020/05/05