package frenzy



Hello all!

I'm experiencing some problems using packages in Lisp and I'm wondering what your opinions are about the packages-facility in Lisp. I've been hearing around and most of my comrades suggest not to use packages. I'd like to use them to avoid nasty things like name-clashes (that's what they're for, right?). Is there any guide on how packages should be used?

Description of the problem I ran into:

Let's say I have some package :exporting-package, which has two functions: ep-internal-fn and ep-external-fn. The ep-internal-fn gets a string as argument and returns a symbol using (read-line str NIL NIL). The ep-external-fn uses eq to compare the result of ep-internal-fn with a pre-programmed symbol 'TEST. The ep-external-fn is exported.

Now another package is defined :importing-package which uses the :exporting-package (use-package). When ep-external-fn is called, the equality is always false. This happens because the result of ep-external-fn is a symbol in the package :importing-package, whereas the 'TEST symbol is defined in the :exporting-package.

Many thanks in advance,

Joris Bleys

.



Relevant Pages

  • Re: Why Lisp is too hard for me to use
    ... Lisps and several libraries. ... so it needs implementation support. ... The current strong support for Lisp ... > This consists of simple .tar.gz packages, ...
    (comp.lang.lisp)
  • Re: CLOS usage patterns?
    ... Nick Lacey writes: ... In Lisp the smallest things these ... Maybe your problem is that you are not creating enough packages, ... > doesn't take the public/private distinction as seriously as Java. ...
    (comp.lang.lisp)
  • Re: A problem statement (and a proposed solution)
    ... that there is progress in the language. ... Lisp in a box does not exist. ... handful packages included. ... Lisp is so special that you don't need to use libraries written by others. ...
    (comp.lang.lisp)
  • Re: Generate plots with lisp
    ... would like the same code to generate a drawing. ... get to learn a bit more lisp. ... packages. ... I did manage to install and load asdf, and likewise for cl-pdf. ...
    (comp.lang.lisp)
  • Re: Troll-o-Matic
    ... controversial questions regarding the Lisp programming language. ... This document is written in the hope that it will improve trolling ... packages for things like the web, threads, regular expressions or OS ... or real elitism in lispnik circles. ...
    (comp.lang.lisp)