emacs-devel
[Top][All Lists]
Advanced

[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: Thu, 7 May 2020 20:32:33 +0100

On Thu, May 7, 2020 at 7:41 PM Vladimir Sedach <address@hidden> wrote:

> I would appreciate it if you stop replying to my suggestion with
> sarcastic misinterpretations, and discuss the issue with other
> programmers in #lisp

I was not being sarcastic now. I didn't understand  what the
recommendation was.  From reading our exchange I thought
it was the exact opposite.

> > No there aren't, short of _not_ providing namespace merging.
> > There's no point in explaining this again, I think.
> I don't know why you are claiming this, considering that you
> previously suggested an excellent solution.

Because but it's not a "solution" to the problem.  A solution
to the potential would make sure it never happens. The only
way to do that is to make sure is to never merge.  But OK,
this is semantics: you call "good practices" a solution, that's
reasonable.

> So you see, by engaging in constructive exploration of the design
> space, you helped to make what I think is a major contribution to
> namespace system design and to Common Lisp.

Hmmm, i'd wait a bit before setting doign the "major contribution"
victory dance :-)

> I am going to start using
> this pattern in my own code, and I hope any future Lisp that wants to
> adopt a Common Lisp-style package system uses this modified design.

No nicknames, no :USE or little on. Seem decent. One fine day
you'll see a use for :USE, I'm sure.

> And the COMMON-LISP package has not changed since 1994.
> This is not the case for Elisp.

That's true.

> One way to address this issue is to version Elisp namespaces to major
> Emacs versions: elisp29, elisp30, etc.

That's a clever solution, indeed. 

> I think this is a much better reason for having a namespace system
> than "I don't want to use autocomplete to type long symbol names."

Whatever works for you. But I have my reasons not to want to
want a prefix repeated ad aeternum (and do use autocomplete).

> which there seems to be no shortage written every day), so why bother
> having it and its many downsides when better alternatives are
> available?

Larger programs have many packages. :USE really is useful
for internal packages, for example.  One common example is the
FOO-TEST that has the tests for the FOO package. Or when the
FOO  package uses the FOO-UTILS package which has internal
and external stuff.  Those are two examples from the top of my
head where I most heartily recommend :USE.

But there are more, when one realizes packages are collections
of symbols, not necessarily definitions.

Also last time I checked package-local nicknames weren't widely
available in impls, so I don't use them.  Maybe that has changed
in the meantime?



reply via email to

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