[Top][All Lists]

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

Re: Help sought understanding shorthands wrt modules/packages

From: Matt Armstrong
Subject: Re: Help sought understanding shorthands wrt modules/packages
Date: Tue, 08 Nov 2022 22:02:08 -0800

Richard Stallman <rms@gnu.org> writes:

> I implemented CL packages 40 years ago -- I don't remember the details.
> There was a feature that let you specify, in one package FOO, "Let me
> omit package prefixes when I refer to symbols from package BAR."
> Then if BAR defines a symbol BAR:HACK, and you write HACK in package FOO
> with no prefix, the package system would search for a symbol HACK, find
> it in package BAR, and treat HACK as an alias for BAR:HACK.
> Is that what :USE does?  If so, it would seem that :USE is the bad design
> I am talking about.


(I have clipped the, I believe, well understood downsides of :use)

> This is a gross bug.  We should not implement such a bug.  No one ever
> should.
> We can make package systems that behave naturally and consistently.
> But they can't be compatible with CL packages.

How about this goal: Any package system adopted by Emacs should allow
new symbols to be exported from a package without risk of breaking its

I wonder if a consensus could be reached here.  Namely, just omit :use
from any Emacs implementation of lisp packages.

I would like to hear more from people with more Common Lisp experience
than I do, but importing all symbols from one package into another does
not strike me as an essential feature, or a good idea in general.  It is
popular in some languages, even idiomatic.  Others, such as Go, make it
impossible to achieve for reasons similar to the ones Richard outlined.
Namely, eventually, heavily used packages cannot add anything new for
fear of breaking something.

reply via email to

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