[Top][All Lists]

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

Re: Should let symbols be interned?

From: Miles Bader
Subject: Re: Should let symbols be interned?
Date: Mon, 22 Jan 2007 13:31:28 +0900

"Lennart Borgman (gmail)" <address@hidden> writes:
> However the real question was of course if the same obarray is used for 
> symbols created by let variable declarations (did I get everything right 
> now?;-) as for symbols created by "defvar" variables. I was surprised by 
> that and a bit curious.

Interning is done by the reader, it has absolutely no connection to the
interpretation of what is being read.

If you want to use an uninterned variable name in a let statement, you
can use the "#:" reader syntax, along with the #n= and #n# syntaxes to
allow using the uninterned variable:

   (intern-soft "my-uninterned-var")
    => nil
   (let ((#1=#:my-uninterned-var 5))
     (+ #1# 3))
    => 8
   (intern-soft "my-uninterned-var")
    => nil


"I distrust a research person who is always obviously busy on a task."
   --Robert Frosch, VP, GM Research

reply via email to

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