[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: the KEYWORD package USEing another package
- To: Gumby@MCC.COM
- Subject: Re: the KEYWORD package USEing another package
- From: NGALL@G.BBN.COM
- Date: Tue, 01 Mar 1988 15:54:00 -0000
- Cc: common-lisp@SAIL.STANFORD.EDU
- In-reply-to: <880229230848.2.GUMBY@THOTH.ACA.MCC.COM>
- Sender: NGALL@G.BBN.COM
Date: Mon, 29 Feb 88 23:08 CST
From: David Vinayak Wallace <Gumby@MCC.COM>
...
Yes there is a problem: you could cause a symbol to be available as a
keyword whose value was not the keyword. E.g:
1 (setf user::keyword-example nil) ==> nil
2 (export 'user::keyword-example) ==> t
3 user:keyword-example ==> nil
4 (use-package '(user) (find-package 'keyword)) ==> t
5 :keyword-example ==> nil
What makes you think that reading and evaluating :keyword-example
results in NIL? Pg 175: "Any symbol preceded by a colon but no
package name ... is added to (or looked up in) the KEYWORD package as
an EXTERNAL symbol." After form 4, user:keyword-example is accessible
only as an INTERNAL symbol in the KEYWORD package. Therefore,
according to my interpretation of the preceding quote, whatever
mechanism "looks up" keyword::keyword-example (aka
user:keyword-example) would EXPORT it from the KEYWORD package,
thereby making it PRESENT in the KEYWORD package, and thereby causing
it to become a constant whose value is itself (all on pg 175). Thus
the value of form 5 would be printed as :keyword-example.
...
-- Nick