unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: BT Templeton <bpt@hcoop.net>
To: guile-devel@gnu.org
Subject: Re: uninterned symbols as Tree-IL constants
Date: Sun, 21 Aug 2011 11:34:37 -0400	[thread overview]
Message-ID: <87zkj2vkvm.fsf@olor.terpri.org> (raw)
In-Reply-To: 87mxf2x5fh.fsf@gnu.org

ludo@gnu.org (Ludovic Courtès) writes:

> Hi,
>
> BT Templeton <bpt@hcoop.net> 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:

  (progn
    '#1=#:foo
    (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	other threads:[~2011-08-21 15:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-21  0:20 uninterned symbols as Tree-IL constants BT Templeton
2011-08-21 13:25 ` Ludovic Courtès
2011-08-21 15:34   ` BT Templeton [this message]
2011-08-21 17:17     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zkj2vkvm.fsf@olor.terpri.org \
    --to=bpt@hcoop.net \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).