On Thu, Sep 10, 2009 at 04:16:22PM -0400, John Cowan wrote: > We have a problem with modules that get replaced: > > #;4> (module foo (foo) (import scheme) (define foo 64)) > #;5> (import foo) > #;6> foo > 32 ; This is bad. > #;7> (module bar () (import scheme) (import foo) foo) > 32 ; This is very, very bad. > #;8> > > To solve the problem at 6, I think we need a "reimport" syntactic form, > which will import modules that have already been imported.
It makes more sense to have "import" simply re-import the module if it's already known. This allows one to simply re(LOAD) a file with module imports while at the REPL, just like loading a file containing (DEFINE)s causes old definitions to be redefined. Cheers, Peter -- http://sjamaan.ath.cx -- "The process of preparing programs for a digital computer is especially attractive, not only because it can be economically and scientifically rewarding, but also because it can be an aesthetic experience much like composing poetry or music." -- Donald Knuth
pgpi8GUPx2W8l.pgp
Description: PGP signature
_______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
