A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://lists.gnu.org/archive/html/emacs-devel/2022-11/msg00488.html below:

Re: Help sought understanding shorthands wrt modules/packages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] From: Gerd Möllmann Subject: Re: Help sought understanding shorthands wrt modules/packages Date: Wed, 9 Nov 2022 09:34:41 +0100 User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.1
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.
Use-package (which is what :use is using in defpackage :-) is kind of a natural thing, for me. For example, this use is ubiquitous and might even be in the standard, I don't remember: 
(in-package "CL-USER")
(use-package "COMMON-LISP")

which basically says "let me use all of CL without qualification" in my interactive session. So, you don't have to write cl:car, you write car.
And that's the spirit in which I've seen use-package is used in general:
You are writing a package doing X11 stuff - you might (or might not) use
package xlib.  You don't like cl:loop, you might want to use the iterate
package.  You're in a compiler package, you might want to use the API of
the assembler package.  And so on.

I think one important part to also keep in mind is that packages allow
internal and external symbols.  The external symbols are the API.  The
internals one can access (with X::Y), if you need to, but you should
feel guilty :-).  The evolution of APIs is of course another can of worms.





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4