From ... Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!uio.no!nntp.uio.no!ifi.uio.no!not-for-mail From: Erik Naggum Newsgroups: comp.lang.lisp Subject: Re: Accessibility of symbols Date: 12 Oct 2002 01:10:05 +0000 Organization: Naggum Software, Oslo, Norway Lines: 42 Message-ID: <3243373805862280@naggum.no> References: <20021011112634.J9853@lain.res.cmu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: maud.ifi.uio.no 1034385007 25037 129.240.65.5 (12 Oct 2002 01:10:07 GMT) X-Complaints-To: abuse@ifi.uio.no NNTP-Posting-Date: 12 Oct 2002 01:10:07 GMT Mail-Copies-To: never User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.lisp:43766 * Matthew Danish | Given that the current package is "FOO" and accessibility is defined to | mean "does not need a package prefix to reference it", it seems to me | that COMMON-LISP:ATOM is not accessible in package "FOO" and should not | be returned by the above LOOP. I see absolutely nothing wrong with your reasoning here. I am somewhat unhappy that the following code behaves correctly in Allegro CL 6.2: (do-symbols (symbol) (when (string-equal symbol "ATOM") (print symbol))) because it does an explicit test for membership in the shadowed-symbols list in a package (see the expansion of the macro). The `loop´ form uses `with-package-iterator´, so the following form also exhibits the problem: (with-package-iterator (get-symbol :foo :inherited) (loop (multiple-value-bind (flag symbol access package) (get-symbol) (when (string-equal symbol "atom") (print (list symbol access package))) (unless flag (return))))) Allegro CL 6.2 violates the standard when it does not obey the requirement that `:inherited´ returns symbols that are shadowed. The requirement is that the symbols returned are specifically: The symbols that are exported by used packages and that are not shadowed. So Allegro CL and LispWorks contain a pretty serious bug in that they do not exclude shadowed symbols the way `do-symbols´ does. It is pretty sad that the two forms use such radically different underlying mechanisms. -- Erik Naggum, Oslo, Norway Act from reason, and failure makes you rethink and study harder. Act from faith, and failure makes you blame someone and push harder.