Bug#494404: patch + comments on cl-geodesics
Peter De Wachter
pdewacht at gmail.com
Tue Aug 26 20:36:11 UTC 2008
On Tue, 26 Aug 2008 01:08:53 +0200
Luca Capello <luca at pca.it> wrote:
> > OTOH, if you decide to keep it, there are a few other problems I
> > noticed:
> >
> > - utilities.lisp doesn't have an IN-PACKAGE form, so it gets loaded
> > in whatever random package happens to be active.
>
> Since it's loaded by all the three subsystems, I'd say it's correct.
Well, consider this transcript:
* (defpackage :foo (:use :common-lisp))
#<PACKAGE "FOO">
* (in-package :foo)
#<COMMON-LISP:PACKAGE "FOO">
* (require :geodesics)
..lots of compiling..
* (apropos "" :foo)
..lots of symbols defined in utilities.lisp..
Utilities.lisp clobbers variables and functions in whatever package the
user happened to be in, that can't be right. And re-loading the
geodesics fasls won't work if that :foo package no longer exists.
> > - The GD-STATIC-EQUAL, GD-STATIC-UNEQUAL and GD-COSMOLOGICAL
> > systems each define the same symbols in the GEODESICS package, so
> > they can't be loaded simultaneously. But that's exactly what the
> > GEODESICS system does. I think each of the GD-* systems needs to
> > live in a separate package?
>
> I guess the idea was to having to load only one system instead of
> three. It can also be possible to split geodesics.asd in three
> different files, one for each subsystem, still providing the old
> geodesics.asd which loads the three.
But those three systems define functions with the exact same names:
geodesics:a
geodesics:da/dt
geodesics:adash
geodesics:n
geodesics:dn/dt
geodesics:ndash
If you load GD-STATIC-UNEQUAL after GD-STATIC-EQUAL, you'll redefine
GD-STATIC-EQUAL's functions. If you next load GD-COSMOLOGICAL, you'll
just redefine them again. A system that loads more than one of these
three is nonsensical.
--
Peter De Wachter
More information about the pkg-common-lisp-devel
mailing list