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

Re: the KEYWORD package USEing another package



	
    Date: Tue, 1 Mar 88 11:06 EST
    From: Barry Margolin <barmar@Think.COM>
    
	Date: Mon, 29 Feb 88 23:08 CST
	From: David Vinayak Wallace <Gumby@mcc.com>
    
            ...
	    (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

Yes. I retract my previous position (that symbols accessible in the
KEYWORD package are made external when they are ACCESSED) and agree
with Barry: a correctable error is signalled (pg. 174) when a symbol
that is internal to the KEYWORD package is referenced with the `:' (or
`keyword:') prefix.

Note that the only possible internal symbols in the KEYWORD package
are those that are inherited.  Thus, one could `block' the addition of
certain symbols to the KEYWORD package by having the KEYWORD package
inherit them.  This might be a useful way to `reserve' some set of
keywords.

-- Nick