Subject: Re: Why I'm giving up on Lisp for now
From: (Rob Warnock)
Date: Sun, 27 Jun 2004 00:43:18 -0500
Newsgroups: comp.lang.lisp
Message-ID: <>
Peter Herth  <> wrote:
| Rob Warnock wrote:
| > - PATH and VALUE are still exported (and conflict with my ~/.cmucl-init).
| Could you please describe your problems in detail ? These symbols are
| supposed to be exported (at least value, path is probably less useful
| for users) I experienced no conflicts with these symbols.

[The following assumes the definition of CREATE-RECTANGLE has
been moved entirely into the LTK package, and EXPORTed...]

My "~/.cmucl-init" file contains (and has done, for several years)
local LET bindings for both PATH and VALUE (inside some personal
convenience functions), which means if I simply do a (USE-PACKAGE :LTK)
as in your examples, there's a conflict:

    > (load "ltk")

    ; Loading #p"/u/rpw3/ltk/ltk.x86f".
    > (use-package :ltk)

    Error in function USE-PACKAGE:
       Use'ing package LTK results in name conflicts for these symbols:

      0: [CONTINUE] Unintern the conflicting symbols in COMMON-LISP-USER...
      1: [ABORT   ] Return to Top-Level.

Whereas if I shadow both PATH and VALUE, things work fine (since the
test code doesn't seem to need them to be visible from within USER):

    > (load "ltk")
    ; Loading #p"/u/rpw3/ltk/ltk.x86f".
    cmu> (shadow '(path value))
    cmu> (setf ltk::*wish-pathname* "wish8.3")
    cmu> (load "foo")
    ; Loading #p"/u/rpw3/ltk/foo.lisp".
    cmu> (gr-unit)
    canvas .w2 -width 300 -height 30
    text .w3 -width 20 -height 10
    puts [.w2 create rectangle 0 0 0 33]

The other alternative [used in my previous reply] is to do
shadowing imports of PATH and VALUE before the USE-PACKAGE,
but that makes the previously-defined local symbols inaccessible
(though the functions using them continue to work, of course).

And on the third hand, the test harness code could simply
not do a USE-PACKAGE at all, and reference all of the Ltk
symbols explicitly [e.g. (LTK:WM-TITLE LTK:*TK* "Unit Test")].
They're only used in a handful of places, and that works
just fine, too.


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607