[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

the KEYWORD package USEing another package



    Date: Mon, 29 Feb 88 23:08 CST
    From: David Vinayak Wallace <Gumby@mcc.com>

	Date: 29 Feb 1988 14:15-EST
	From: NGALL@G.BBN.COM
	
	    Date: 24 Feb 1988 19:20-PST
	    From: David Bein <pyrnj!pyramid!bein@rutgers.edu>

	Cf. pg 187: "It is an error to try to use the KEYWORD package."
	I don't see any problem with having the KEYWORD package use another package
	(I don't see much point to it either).  Do you?

    Yes there is a problem: you could cause a symbol to be available as a
    keyword whose value was not the keyword.  E.g:

	(setf user::keyword-example nil) ==> nil
	(export 'user::keyword-example) ==> t
	user:keyword-example ==> nil
	(use-package '(user) (find-package 'keyword)) ==> t
	:keyword-example ==> nil

Actually, this should result in an error due to an attempt to reference
an internal symbol as an external, because when a package uses another
package the symbols in the used package are internal to the using
package until it exports them.  CLtL only says that symbols in the
keyword package are made external when they are added to the package,
not when they are accessed through indirection.

                                                barmar