Subject: [clisp-list] 2.31: space -> times

From: Carlo Traverso <[email-masked]>
Date: Sun Sep 7 03:45:02 2003

In clisp 2.31, the SPACE macro has been renamed TIMES. Alas, this has
broken some programs of mine, that worked in clisp 2.30 and defined
their own TIMES function, since now (defun times .....) gives a
continuable error.

[1]> (defun times())

** - Continuable Error
DEFUN/DEFMACRO(TIMES): #<PACKAGE EXT> is locked
If you continue (by typing 'continue'): Ignore the lock and proceed

1. Break [2]> 

Wouldn't be wiser either to use a less common name (TIME-AND-SPACE) or
(better) make it unaccessible at startup without a package extension?

Carlo Traverso

---

From: Kaz Kylheku <[email-masked]>
Date: Sun Sep 7 05:57:02 2003

> Wouldn't be wiser either to use a less common name (TIME-AND-SPACE) or

No; this is what the package system is for.

> (better) make it unaccessible at startup without a package extension?

That is what the COMMON-LISP-USER package is for. ANSI CL allows 
implementations to expose extensions there, making them conveniently
accessible from the REPL.  If you intern your program's symbols under
COMMON-LISP-USER, you risk clashing with some implementation's
extensions, which may fluctuate from release to release.  
The solution is to define your own package, in which exactly those
things are visible that you choose.

---

From: Pascal J.Bourguignon <[email-masked]>
Date: Sun Sep 7 07:08:06 2003

> (better) make it unaccessible at startup without a package extension?

(UNUSE-PACKAGE "EXT")
TIMES        ;; mine
(EXT:TIMES)  ;; theirs

Perhaps it's allowed  by the standard, but IMHO,  a Common-Lisp system
by default  should not  use any other  package than  COMMON-LISP.  The
following should be forbidden. (Same result with -ansi).

[pascal@thalassa palm]$ /usr/local/bin/clisp -norc
  i i i i i i i       ooooo    o        ooooooo   ooooo   ooooo
  I I I I I I I      8     8   8           8     8     o  8    8
  I  \ `+' /  I      8         8           8     8        8    8
   \  `-+-'  /       8         8           8      ooooo   8oooo
    `-__|__-'        8         8           8           8  8
        |            8     o   8           8     o     8  8
  ------+------       ooooo    8oooooo  ooo8ooo   ooooo   8

Copyright (c) Bruno Haible, Michael Stoll 1992, 1993
Copyright (c) Bruno Haible, Marcus Daniels 1994-1997
Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998
Copyright (c) Bruno Haible, Sam Steingold 1999-2002

[1]> (quit)
Bye.

You can easily implement this rule adding in your ~/.clisprc.lisp:

(mapc (lambda (used) (unuse-package used "COMMON-LISP-USER"))
      (delete (find-package "COMMON-LISP") 
              (package-use-list "COMMON-LISP-USER")))

-- 
__Pascal_Bourguignon__                   http://www.informatimago.com/
----------------------------------------------------------------------
Do not adjust your mind, there is a fault in reality.