Commit 81c53f9e authored by Ambrevar's avatar Ambrevar

modern-common-lisp: Document package local nicknames.

parent 217343e9
#+TITLE: Modern, functional Common Lisp: Myths and tips
# TODO: Mention the macro-stepper and show a picture?
# TODO: Don't use =use=?
Common Lisp is a very powerful programming language, and yet it seems to only
enjoy a shy popularity. What is happening?
......@@ -292,6 +290,26 @@ prefer the safe way, stick to package imports.
packages, make sure you pin their exact version.
(Thanks to [[][flaming_bird]] for the [[][detailed explanation]].)
** Local package nicknames
Since you should (almost always) =import= packages, you'll have to prefix their
symbols with the package name. Sometimes this package name can be lengthy to
write: in this case, you should know that you can assign a local nickname to any
#+begin_src lisp
(defpackage my-package
(:use #:cl)
(:local-nicknames (#:a
So now you can call the much shorter ~a:compose~ from your package!
See [[][package-local-nicknames]].
This approach is preferred over using the ~rename-package~ procedure which is
** Recommended language-enhancing packages
The following packages are widespread and useful enough that can be =import=-ed
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment