emacs-devel
[Top][All Lists]
Advanced

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

Re: Using empty_string as the only "" string


From: Miles Bader
Subject: Re: Using empty_string as the only "" string
Date: Wed, 25 Apr 2007 07:11:55 +0900

"Juanma Barranquero" <address@hidden> writes:
> Oh, I'm not a big expert in Lisp, but I don't think I'm
> misunderstanding anything.

You are misunderstanding what guarantees are made in lisp about object
identity.

> No doubt. But I would consider broken an implementation which
> canonicalized 0.0 and not 1.0, for example.

You're free to think what you like, but there are such implementations,
and they are not generally considered "broken."

For instance franz-lisp, which keeps "common" floating point numbers in
a small table for sharing, but heap-allocates all other floats; thus you
get something like (eq 0.0 0.0) => t, but (eq 1987.57 1987.57) => nil.

[There's also the traditional fixnum/bignum divide, which has a similar
effect on integers.]

Compiler optimizations can have similar effects.

-Miles

-- 
People who are more than casually interested in computers should have at
least some idea of what the underlying hardware is like.  Otherwise the
programs they write will be pretty weird.  -- Donald Knuth




reply via email to

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