axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] ANSI Lisp and Axiom (Boot)


From: Humberto Ortiz-Zuazaga
Subject: Re: [Axiom-developer] ANSI Lisp and Axiom (Boot)
Date: Mon, 05 Mar 2007 08:19:24 -0400
User-agent: Thunderbird 1.5.0.10 (Macintosh/20070221)

Gabriel Dos Reis wrote:

> Gosh, try to report an issue with the build system and you a get a
> full lecture on what does not help you.

How's this? In cltl1 gcl IN-PACKAGE will create a package if it did not
exist. In ANSI lisps, you need to DEFPACKAGE the package first. The
defpackage coerces the argument to a string, and the package is created
with that string as a name.

CL-USER> (in-package #:foo)
"The name \"FOO\" does not designate any package."
; Evaluation aborted
CL-USER> (defpackage #:bar)
#<PACKAGE "BAR">
CL-USER> (in-package #:bar)
#<COMMON-LISP:PACKAGE "BAR">
BAR>

The same code should cause ANSI gcl to choke too. In fact, ANSI gcl
won't let you use #:bar as a package name.

$ gcl
GCL (GNU Common Lisp)  2.6.7 ANSI    May 31 2006 04:48:55
Source License: LGPL(gcl,gmp), GPL(unexec,bfd)
Binary License:  GPL due to GPL'ed components: (READLINE BFD UNEXEC)
Modifications of this banner must retain notice of a compatible license
Dedicated to the memory of W. Schelter

Use (help) to get some basic information on how to use GCL.

>(in-package #:foo)

Error in EVAL [or a callee]: The variable #:FOO is unbound.

Fast links are on: do (use-fast-links nil) for debugging
Broken at IN-PACKAGE.  Type :H for Help.
 1 (Abort) Return to top level.
dbl:>>:q

Top level.
>(defpackage #:bar)

#<"BAR" package>

>(in-package #:bar)

Error in EVAL [or a callee]: The variable #:BAR is unbound.

Fast links are on: do (use-fast-links nil) for debugging
Broken at IN-PACKAGE.  Type :H for Help.
 1 (Abort) Return to top level.
dbl:>>:q

Top level.
>(in-package "BAR")

#<"BAR" package>

BAR>

-- 
Humberto Ortiz-Zuazaga
Programmer-Archaeologist
University of Puerto Rico
http://www.hpcf.upr.edu/~humberto/

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]