in-package CLtL1/CLtL2 compatibility help needed 
Author Message
 in-package CLtL1/CLtL2 compatibility help needed

Hi,

We wish to maintain a CLtL1/CLtL2 compatible set of utilities and
programs. Smaller utilities usually come in one file. I'd like to keep
it this way. Some utilities define their own package in this one file.

The problem now is that some CLtL1s Lisps expect the first form in
that file to be (in-package ...) for the compiler to know where to put
things. CLtL2 Lisps generate an error because the package hasn't been
defined yet.

I'm missing schemes about "how to do the right thing". Do you think
that the following is portable:

; -*- Mode: Lisp -*-
(unless (find-package "PACK") (make-package "PACK"))
(in-package "PACK")

...
;EOF

Thanks for your help,
        Joerg Hoehle.



Mon, 29 Jul 1996 00:12:25 GMT  
 in-package CLtL1/CLtL2 compatibility help needed

Quote:
>I'm missing schemes about "how to do the right thing". Do you think
>that the following is portable:

>; -*- Mode: Lisp -*-
>(unless (find-package "PACK") (make-package "PACK"))
>(in-package "PACK")

It can fail if the initial package doesn't inherit from the LISP or
COMMON-LISP package.  The following should be more portable:

#+CLTL2
(common-lisp:in-package "COMMON-LISP")
#-CLTL2
(lisp:in-package "LISP")
(unless (find-package "PACK") (make-package "PACK"))
(in-package "PACK")
--
Barry Margolin
System Manager, Thinking Machines Corp.




Wed, 31 Jul 1996 01:54:37 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. cltl2 format in cltl1 ?

2. CLTL1 ---> CLTL2

3. #+COMMON, #+COMMON-LISP, #+CLtL1 or #+CLtL2?

4. CLtL2/X3J13 issue: symbols in the Common-Lisp package

5. Need Help with Type Compatibility Problem

6. Drive A is using MS-Dos Compatibility Mode File System -- NEED HELP --

7. Announce: ANS-Forth Compatibility Package for F-PC

8. ANSI.SEQ: An ANS-Forth compatibility package for F-PC

9. Nisp compatibility package for standard Scheme?

10. A Flavors compatibility package...

11. Looking for ZetaLisp compatibility package

12. Nisp compatibility package for standard Scheme?

 

 
Powered by phpBB® Forum Software