Matthew Mondor <[email protected]> writes: > On Tue, 9 Oct 2012 19:55:52 -0400 > Matthew Mondor <[email protected]> wrote: > >> ECL: >> >> (make-package :foo) -> #<"FOO" package> >> (defparameter foo::gentemp 10) -> GENTEMP >> (symbol-package 'foo::gentemp) -> #<"COMMON-LISP" package> > > Also: > > SBCL: > * (make-package :foo) > > #<PACKAGE "FOO"> > * (in-package :foo) > > #<COMMON-LISP:PACKAGE "FOO"> > * (cl:import (cl:make-symbol "GENTEMP")) > > COMMON-LISP:T > * (cl:describe 'gentemp) > > FOO::GENTEMP > [symbol] > * (cl:symbol-package 'gentemp) > > #<COMMON-LISP:PACKAGE "FOO"> > > > ECL: > >> (make-package :foo) > > #<"FOO" package> >> (in-package :foo) > > #<"FOO" package> > FOO> (cl:import (cl:make-symbol "GENTEMP")) > > Condition of type: SIMPLE-PACKAGE-ERROR > Cannot import the symbol #:GENTEMP from package #<FOO package>, > because there is already a symbol with the same name > in the package. > > Available restarts: > > 1. (CONTINUE) Ignore conflict and proceed > 2. (RESTART-TOPLEVEL) Go back to Top-Level REPL. > > Broken at SI:BYTECODES. [Evaluation of: (IMPORT (MAKE-SYMBOL "GENTEMP"))] In: > #<process TOP-LEVEL>. > > > New ECL session: > >> (make-package :foo) > > #<"FOO" package> >> (symbol-package 'foo::gentemp) > > #<"COMMON-LISP" package> > >> (foo::gentemp) > > T0 > > > So if I understand, a virgin package automatically uses CL?
The default package use list if :use is not provided is implementation-defined. SBCL is unique (I think) in using the empty list. Historically other Lisps had at least the CL package and possibly others in the default list. If you want to have more predictability, provide an explicit :use nil in make-package or (:use) in defpackage. Zach ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ Ecls-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ecls-list
