help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Adding Lists/Sequences


From: Pascal J. Bourguignon
Subject: Re: Adding Lists/Sequences
Date: Fri, 26 Sep 2008 00:16:32 +0200
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.2 (gnu/linux)

David Kastrup <dak@gnu.org> writes:

> Tim X <timx@nospam.dev.null> writes:
>
>> 1. Modifying 'literal' lists is usually risky. Weird things can happen
>> because on some levels, you are modifying what is best considered a
>> constant.
>
> That's all very vague and fuzzy, but there are no vague or fuzzy
> semantics involved.

Yes, there is vague and fuzzy semantics involved.

The vagueness and fuzzyness is not very well characterised, because
emacs lisp is not defined by a "standard", only by a (couple of)
implementation(s). 

Nonetheless, nowhere can you see documented what the compiler does
with literal objects.  It could merge or duplicate them at will.
Therefore self modifying code won't behave the same when interpreted
and when compiled.


>> This is the difference between '(1 2 3) and (list 1 2 3).
>
> The difference is that the first form is turned into a list by the Lisp
> reader, each time it is passed through the reader (in most cases, once).
> In interactive use, it is perfectly equivalent to the second form.  When
> put into function definitions or bound to anything, it isn't.

Yes, another fuzzyness.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

HANDLE WITH EXTREME CARE: This product contains minute electrically
charged particles moving at velocities in excess of five hundred
million miles per hour.


reply via email to

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