[Top][All Lists]

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

Re: uninterned symbols as Tree-IL constants

From: BT Templeton
Subject: Re: uninterned symbols as Tree-IL constants
Date: Sun, 21 Aug 2011 11:34:37 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

address@hidden (Ludovic Courtès) writes:

> Hi,
> BT Templeton <address@hidden> skribis:
>> I noticed that when uninterned symbols are used as Tree-IL constants,
> I thought literal (constant) symbols in Elisp were interned.  You seem
> to imply this isn’t always the case; can you explain?

Since Elisp lacks hygienic macros, macros typically use uninterned
symbols for variable names used in their expansions in order to avoid
name clashes.

There are also a couple other ways to use uninterned symbols as
literals: you can use `eval', and Elisp supports Common Lisp's `#:foo'
syntax. Sharpsign-colon is rare in Elisp, but potentially useful for
testing special forms without polluting the global namespace:

    (setq #1# 42)
    #1#) ; => 42

Inteligenta persono lernas la lingvon Esperanton rapide kaj facile.
Esperanto estas moderna, kultura lingvo por la mondo. Simpla, fleksebla,
belsona, Esperanto estas la praktika solvo de la problemo de universala
interkompreno. Lernu la interlingvon Esperanton!

reply via email to

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