Commit 217343e9 authored by Ambrevar's avatar Ambrevar

modern-common-lisp: Discourage use of :use.

parent 6d0b63fc
......@@ -273,18 +273,28 @@ all symbols will be accessible only via the package prefix.
The benefit of ~use~ is that importing a language-enhancing package gives us a
feel that the enhancements are first class.
The drawback however is that if you change your mind and decide to ~import~ the
package instead, you'll have to add the package prefix to all the related
symbols manually. Plus it's harder to see from just a glance which symbols
comes from which package.
~Use~-ing packages has a few drawbacks however, so be mindful of them. If you
prefer the safe way, stick to package imports.
This drawback could be eliminated with sufficient editor support to refactor
symbols by their packages.
See https://github.com/slime/slime/issues/532 for a discussion.
- The drawback however is that if you change your mind and decide to ~import~ the
package instead, you'll have to add the package prefix to all the related
symbols manually.
This issue could be eliminated with sufficient editor support to refactor
symbols by their packages.
See https://github.com/slime/slime/issues/532 for a discussion.
- It's harder to see from just a glance which symbols comes from which package.
- =Use=-ing a package without pinning its version (or even commit) is exposes
your project to breakage if the package upstream adds a new symbols that would
conflict with one of your symbols. As a minimum requirement to =use=-ing
packages, make sure you pin their exact version.
(Thanks to [[https://old.reddit.com/user/flaming_bird][flaming_bird]] for the [[https://old.reddit.com/r/lisp/comments/f98d1h/modern_functional_common_lisp_myths_and_best/fipyf7u/][detailed explanation]].)
** Recommended language-enhancing packages
The following packages are widespread and useful enough that can be =use=-d
The following packages are widespread and useful enough that can be =import=-ed
without hesitation:
- [[https://common-lisp.net/project/alexandria/][Alexandria]]: various language and functional programming procedures.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment