What is the common lisp way to rename a namespace to something else. So instead of writing hunchentoot:start I could write ht:start.
I'm looking for something like pythons import A as B.
Edit: Using the accepted answer, the code for adding a nickname for hunchentoot is as follows:
(rename-package :hunchentoot :hunchentoot '(:ht))
What you call a namespace is a Common Lisp package created with defpackage
You would like the package nickname to be ht
Performing a defpackage
on an existing package has implementation defined behavior, but some implementations permit adding nicknames that way.
There is also a function rename-package
that renames and adds nicknames to a package.
I use this :
(defpackage :foo+bar
(:use :bar)
(:export
#:*foo* #:foo #:foo-p #:foo-ffs!
. #.(let (ext)
(do-external-symbols (sym :bar)
(push (symbol-name sym) ext))
ext)))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With