Fix keyword internalization in defsystem and defpackage#47
Fix keyword internalization in defsystem and defpackage#47kilianmh wants to merge 6 commits intoedicl:masterfrom
Conversation
|
Personally, I am of the opinion that package names should be written as keywords, because I value having them autocompleted. For symbol names in clauses like I find it both aesthetically pleasing and useful that, when a package definition lists package names as keywords and symbol names as uninterned symbols, my editor highlights them differently; it makes skimming the package definitions much easier. I'd like input from some other people, ideally, as to whether it's preferable to write |
|
Two cents from me: I don't care much for package autocompletion since my interactive package traversal happens mostly via the slime REPL shortcut |
|
Why is "polluting the namespace" a problem? |
|
I guess it's about a) keeping keyword syntax completions minimal and b) microoptimizations, since you can't portably unintern a keyword without UB. |
Editors (i.e. Emacs with SLIME or SLY) examine the accessible symbols in a package when autocompleting. With no package prefix, they search the interned symbols in
I favor a package-per-file style with ASDF's |
Thank you for explaining, that is a good reason. |
|
Thank you for the valuable feedback! According to this post from Rainer Joswig, another problem might be:
Now |
|
Reverted |
- Avoid cl-ppcre/test as keyword in :in-order-to clauses -> avoid internalization in keyword package - Simplify :perform clause in defpackage -> avoid internalization of cl-ppcre-test and run-all-tests in keyword package
|
Summary: Fix keyword internalization in defsystem and defpackage
-> 35 less keywords interned when loading cl-ppcre |
Replaced all keyword arguments with uninterned symbols in DEFPACKAGE and IN-PACKAGE. This should reduce pollution of namespace and enable consistent highlighting in editors.