Path: utzoo!utgpu!watserv1!watmath!att!rutgers!tut.cis.ohio-state.edu!sacral.cis.ohio-state.edu!welch From: welch@sacral.cis.ohio-state.edu (Arun Welch) Newsgroups: comp.lang.lisp Subject: Re: Common Lisp Package System Considered Harmful Message-ID: Date: 19 Oct 90 19:55:45 GMT References: <271CDC30.1E54@wilbur.coyote.trw.com> <2865200060@ARTEMIS.cam.nist.gov>?<2298@heavens-gate.lucid.com>?<271BA6D1.5B83@wilbur.coyote.trw.com> <271E0D40.451E@wilbur.coyote.trw.com> Sender: news@tut.cis.ohio-state.edu Organization: OSU-LAIR Lines: 48 In-reply-to: scott@wiley.uucp's message of 18 Oct 90 20:14:56 GMT In article <271CDC30.1E54@wilbur.coyote.trw.com> scott@wiley.uucp writes: >I agree that the intent that I intended to use packages for and the >intent they were designed for are probably quite different. I don't >know what packages were designed for. I have been told that they are >to be used for separating large subsystems of code. Yup, that's it. To give an example of how packages are so usefull, look at Interlisp, which had no packages. The convention that everyone used was, to quote from a truly ancient mail message to 1100Users: >Date: 18 FEB 84 18:31 PST >From: ROACH.PA@PARC-MAXC.ARPA >Subject: RE: Flame topic: Naming Conventions and Packages >To: 1100USERS@SUMEX-AIM.ARPA >cc: ROACH.PA@PARC-MAXC.ARPA > > I would encourage the following convention. Atoms in a package >used for function names, property names, or as global variables should >have the form P.FOO or \P.FOO where P is a nontrivial (>= 3 chars) >prefix. . . . > Slash with "\" any function name, property name, >or global variable whose casual redefinition via DEFINEQ, PUTPROP, or >SETQ (you get the idea) would crash the user. Read module for package above, since the message predates the current use of package. Believe me, having packages is a whole lot better than the other option. Doing an apropos on something like OPEN under Medley yeilds FB.OPEN, TCP.OPEN, CHAT.OPEN, etc. It's interesting to see that some people are even using pseudo-packages in Emac's Elisp, by prefixing their code with package-name:variable (Franz's lisp-emacs interface comes to mind). Most lisps are really whole environments, and you really don't want to clobber yourself by redefining something as innocuous as VERIFY, for example, if it was used by the memory management system. IL programmers generally went to great pains so that casual users didn't redefine important symbols, and having a package boundary with import and export is much simpler. I'd suspect that most IL programmers have trashed the environment at least once by not being careful enough, and having to reload and/or recreate your work isn't fun. ...arun ---------------------------------------------------------------------------- Arun Welch Lisp Systems Programmer, Lab for AI Research, Ohio State University welch@cis.ohio-state.edu