Packages are uninterned wether you prefix their names with #: or not
Bug #1973580 reported by
Philippe de Rochambeau
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Hello,
according to https:/
* *package*
#<PACKAGE "COMMON-LISP-USER">
* (defpackage bar)
#<PACKAGE "BAR">
* (find-symbol "bar")
NIL
NIL
* *package*
#<PACKAGE "COMMON-LISP-USER">
* (defpackage #:bar)
#<PACKAGE "BAR">
* (find-symbol "bar")
NIL
NIL
description: | updated |
To post a comment you must log in.
I think this report confuses a couple of things.
Firstly, it's not the package itself that is interned or not, but the symbol that is used as a designator for the package.
Secondly, the default state of the reader when reading a symbol is to find a symbol with the name that is the uppercase version of the textual name. So not only does
(defpackage bar)
define a package called "BAR", it has done so via interning a symbol whose name is "BAR" (not "bar").
Here is a transcript which hopefully illustrates the difference between using interned and uninterned symbols to name a package:
* (defpackage foo)
#<PACKAGE "FOO">
* (find-symbol "FOO")
FOO
:INTERNAL
* (defpackage #:bar)
#<PACKAGE "BAR">
* (find-symbol "BAR")
NIL
NIL