emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: infloop in skeleton-insert


From: Miles Bader
Subject: Re: infloop in skeleton-insert
Date: Wed, 11 Apr 2007 10:41:04 +0900

Nick Roberts <address@hidden> writes:
> Yes.  I still don't get it.

`eq' compares immediate values in lisp.  All integers in emacs lisp are
immediate values.  Floating point numbers in Emacs lisp are "boxed" --
allocated on the heap -- just like cons-cells or whatever.

So if you do (let ((v1 5) (v2 5) (v3 5.0) (v4 5.0)) ...), v1's and v2's
immediate values are the integer "5", so (eq v1 v2) will return t, but
v4's and v5's immediate values are _pointers_ to heap locations
containing 5.0.  v3 and v4 may point to the same location in the heap or
different locations (in this case probably different locations, but I
don't know of any guarantee); (eq v3 v4) can return t or nil depending
on which is the case.

-Miles

-- 
Any man who is a triangle, has thee right, when in Cartesian Space, to
have angles, which when summed, come to know more, nor no less, than
nine score degrees, should he so wish.  [TEMPLE OV THEE LEMUR]




reply via email to

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