Barry Margolin
4/30/2016 9:16:00 PM
In article <m2r3dmrhcr.fsf@googlemail.com>,
Frank DG1SBG <dg1sbg@googlemail.com> wrote:
> "Pascal J. Bourguignon" <pjb@informatimago.com> writes:
>
> > Frank DG1SBG <dg1sbg@googlemail.com> writes:
> >
> >> Frank DG1SBG <dg1sbg@googlemail.com> writes:
> >>
> >> It should read:
> >>
> >> (defpackage frgo)
> >>
> >> (in-package frgo)
> >>
> >> (defun get ())
> >
> > This code is not conforming, because (defpackage frgo) is implementation
> > dependant.
> > More precisely, the default use list in defpackage is. If you don't
> > want to use anything, you must explicitely say so:
> >
> > (defpackage "FRGO"
> > (:use))
> >
> >
> > Furthermore, if you create a package without any symbol, then of course,
> > you won't have any symbol in it! So after in-package, you will have to
> > qualify all the symbols you want to read from other packages:
> >
> > (defpackage "FRGO"
> > (:use))
> > (in-package "FRGO")
> > (cl:defun get ())
> >
> >
> >> My understanding of visibility of functions outside of a package is
> >> that
> >> symbols only clash if they are exported from the package ... Which
> >> isn't
> >> the case here...
> >
> > Kaz explained it nicely. Read again his answer.
>
> Yes, I did. The error came from not declaring (:use) - didn't know that
> I have to explicitely say this to exclude any package from being used by
> default.
How did you expect DEFUN to be found if it didn't use the CL package? If
you thought it wouldn't automatically use CL, why didn't you write
cl:defun?
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***