home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!zaphod.mps.ohio-state.edu!think.com!barmar
- From: barmar@think.com (Barry Margolin)
- Newsgroups: comp.lang.lisp
- Subject: Re: exported symbols, and packages:
- Keywords: export symbol package
- Message-ID: <18r7h9INNb5m@early-bird.think.com>
- Date: 11 Sep 92 22:44:57 GMT
- References: <1992Sep11.193138.3277@cs.cornell.edu>
- Organization: Thinking Machines Corporation, Cambridge MA, USA
- Lines: 36
- NNTP-Posting-Host: telecaster.think.com
-
- In article <1992Sep11.193138.3277@cs.cornell.edu> raman@cs.cornell.edu (T. V. Raman) writes:
- >I find that when in the user package all symbols that are exported
- >from other packages are present in the user package as symbols. ie:
-
- I don't think that's what is happening.
-
- >If I have a package *foo* that exports a function #'foo then if in
- >the user package there is a symbol 'foo presents which evaluates to
- >itself. (find-symbol 'foo) returns
- >
- >foo
- >:internal
-
- Try (find-symbol "FOO" '*foo*). It should return something like:
-
- *FOO*:FOO
- :EXTERNAL
-
- >Is this what is supposed to happen? If so why? Why should the symbol
- >'foo be present in the user package in this way?
-
- When you typed the form (find-symbol 'foo), the reader interned the symbol
- that you typed into the current package, creating a new symbol named "FOO"
- in the USER package if necessary. Try (eq 'foo 'foo:foo); I'll bet it
- returns NIL.
-
- Note that the first argument to FIND-SYMBOL and INTERN is required to be a
- string, not a symbol. If your implementation permits you to use a symbol
- there, that's an extension. Neither Symbolics Common Lisp nor CMU CL
- permit it, but Lucid CL does.
-
- --
- Barry Margolin
- System Manager, Thinking Machines Corp.
-
- barmar@think.com {uunet,harvard}!think!barmar
-