From: glauber
Subject: Q: how to divide program in multiple files
Date: 
Message-ID: <8vu16f$l1$1@nnrp1.deja.com>
Hello,

sorry, this is pretty basic stuff, but the books i have seem reluctant to go
into packages and how to combine them into a larger program (maybe because
there are implementation differences lurking there?).

Anyway, the system i've been using is to create 1 package per file. Each one
of these starts with a (defpackage...) followed by (in-package). Then the
definitions for the functions in that package. I don't close the file with
(in-package "COMMON-LISP-USER").

The main program file then uses (load) to process each of the package files,
followed by (in-package "COMMON-LISP-USER").

Is this the usual way to do things? One would expect there should be some
sort of higher level mechanism to allow you to find your packages and load
them. I found "provide" and "require" in the standard, but they seem to be
very implementation-specific.


--
Glauber Ribeiro
··········@my-deja.com    http://www.myvehiclehistoryreport.com
"Opinions stated are my own and not representative of Experian"


Sent via Deja.com http://www.deja.com/
Before you buy.
From: glauber
Subject: Re: Q: how to divide program in multiple files
Date: 
Message-ID: <8vu9jc$57u$1@nnrp1.deja.com>
In article <···········@nnrp1.deja.com>,

[...]

> Is this the usual way to do things? One would expect there should be some
> sort of higher level mechanism to allow you to find your packages and load
> them. I found "provide" and "require" in the standard, but they seem to be
> very implementation-specific.


Following up on this, the standard says that provide and require are
"deprecated", but it doesn't give an alternative. Is there one?

glauber

--
Glauber Ribeiro
··········@my-deja.com    http://www.myvehiclehistoryreport.com
"Opinions stated are my own and not representative of Experian"


Sent via Deja.com http://www.deja.com/
Before you buy.