From ... Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeed1.bredband.com!bredband!uio.no!193.213.112.26.MISMATCH!newsfeed1.ulv.nextra.no!nextra.com!news-feed.ifi.uio.no!ifi.uio.no!not-for-mail From: Erik Naggum Newsgroups: comp.lang.lisp Subject: Re: newbie: using packages and CLOS Date: 30 Aug 2002 01:36:59 +0000 Organization: Naggum Software, Oslo, Norway Lines: 31 Message-ID: <3239660219282629@naggum.no> References: <3D6E425E.2030709@hotmail.com> <3D6E96C7.6000902@hotmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: maud.ifi.uio.no 1030671420 28917 129.240.64.16 (30 Aug 2002 01:37:00 GMT) X-Complaints-To: abuse@ifi.uio.no NNTP-Posting-Date: 30 Aug 2002 01:37:00 GMT Mail-Copies-To: never User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.lisp:39118 * Gregory Bird | Is it OK to place each class definition and corresponding methods in a | separate file (without packages)? You should always use `defpackage´ to define the package and `in-package´ to instruct the reader to use that package for the remainder of the file (or until another `in-package´, but this is often confusing). `use-package´ is not a user-level function, contrary to its appealing name; it is used by the package system internals and is made available to the programmer because you sometimes want to mess with a package at runtime. Common Lisp has many functions that are there for the expert user but should not be used casually. Likewise, when you run your application, use `in-package´ to switch to that package. You should not let the Common-Lisp-User package use your package. | How do lisp programmers keep their code organized? Three Files for the Elven-kings under the sky, Seven for the Dwarf-lords in their halls of stone, Nine for Mortal Men doomed to die, One for the Dark Lord on his dark throne, In the Land of Mordor where the Users lie. One `defsystem´ File to rule them all, One `defpackage´ File to find them, One `defapplication´ File to bring them all and in the darkness bind them, In the Land of Mordor where the Users lie. -- 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.