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

*To*: common-lisp@sail.stanford.edu*Subject*: constant folding/smashing (constant hash tables)*From*: sandra@cs.utah.edu (Sandra J Loosemore)*Date*: Sat, 11 Jun 88 19:34:01 MDT*Cc*: edsel!jonl@labrea.stanford.edu, eliot@cs.umass.edu

> From: edsel!jonl@labrea.stanford.edu (Jon L White) > Subject: constant folding/smashing > > re: What about constant hash-tables? No variety of QUOTE can build > a constant hash table because there is no notation for them. > (I don't count #.(make-hash-table...) because it's so gross.) > > There is a proposal before X3J13 now (presented by Dave Touretzky) to > give a printable representation to hashtables. If a sufficiently powerful > version of it is adopted, then it should be possible to use QUOTE to > reference a constant hashtable. There is already a way to make a constant hashtable with QUOTE. Try: (defmacro make-a-constant-hash-table () `(quote ,(make-hash-table ...))) This same trick can also be used to make "constants" out of other kinds of weird objects, like packages or streams. -Sandra -------

- Prev by Date:
**constant folding/smashing** - Next by Date:
**Backquote Constants** - Previous by thread:
**EQUAL** - Next by thread:
**Backquote Constants** - Index(es):