From: Antony on
In the copy of cffi I have (I forget when I got it)
I see in file libraries.lisp the following code

(defvar *foreign-library-directories* '()
"List onto which user-defined library paths can be pushed.")

Isn't modifying this have undefined consequences.
-Antony
From: Leandro Rios on
Antony <spam+lisp_dot_linux(a)gmail.com> writes:

> In the copy of cffi I have (I forget when I got it)
> I see in file libraries.lisp the following code
>
> (defvar *foreign-library-directories* '()
> "List onto which user-defined library paths can be pushed.")
>
> Isn't modifying this have undefined consequences.
> -Antony

No, what have undefined consequences is the modification of literal
data structures. What you have here is a variable containing nil
('() is the other representation of nil, you use it when you want to
point out that the variable thus initialized will contain a list), so
the consequences of modifying it are well defined.

I hope I understood correctly your question.

Leandro
From: Kaz Kylheku on
On 2010-01-07, Antony <spam+lisp_dot_linux(a)gmail.com> wrote:
> In the copy of cffi I have (I forget when I got it)
> I see in file libraries.lisp the following code
>
> (defvar *foreign-library-directories* '()
> "List onto which user-defined library paths can be pushed.")
>
> Isn't modifying this have undefined consequences.

Pushing a list variable does not modify the list which is already there.

This is covered in CONS 101 at lisp.edu.
From: Madhu on

* Kaz Kylheku <20100108115313.930(a)gmail.com> :
Wrote on Fri, 8 Jan 2010 19:54:54 +0000 (UTC):

| On 2010-01-07, Antony <spam+lisp_dot_linux(a)gmail.com> wrote:
|> In the copy of cffi I have (I forget when I got it)
|> I see in file libraries.lisp the following code
|>
|> (defvar *foreign-library-directories* '()
|> "List onto which user-defined library paths can be pushed.")
|>
|> Isn't modifying this have undefined consequences.
|
| Pushing a list variable does not modify the list which is already
| there.
|
| This is covered in CONS 101 at lisp.edu.

Besides (EQ NIL '()) => T
In other words, '() is not a literal list which cannot be modified. It
is identical to the constant variable NIL ``that is at once the symbol
named "NIL" in the COMMON-LISP package and the empty list.''
(As it is a constant variable, you cannot modify NIL)
--
Madhu
From: mdj on
On Jan 9, 11:16 am, Madhu <enom...(a)meer.net> wrote:

> Besides (EQ NIL '()) => T
> In other words, '() is not a literal list which cannot be modified. It
> is identical to the constant variable NIL ``that is at once the symbol
> named "NIL" in the COMMON-LISP package and the empty list.''
> (As it is a constant variable, you cannot modify NIL)

There is no such thing as a constant variable (as the obvious oxymoron
indicates)

Lisp will, however, treat an 'empty' list as NIL... If you think about
it, there's nothing to CONS ...

Matt