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

backquote semantics



re-sending...

Date: Mon, 27 Jul 87 15:55:40 EDT
From: Jonathan A Rees <JAR@mc.lcs.mit.edu>
Subject:  backquote semantics
To: stevev%tekchips.tek.com@RELAY.CS.NET
cc: rrrs-authors%tekchips.tek.com@RELAY.CS.NET
In-reply-to: Msg of 22 Jul 87 14:16:12 PDT (Wed) from Steve Vegdahl <stevev%tekchips.tek.com at RELAY.CS.NET>
Message-ID: <233499.870727.JAR@AI.AI.MIT.EDU>

    Date: 22 Jul 87 14:16:12 PDT (Wed)
    From: Steve Vegdahl <stevev%tekchips.tek.com at RELAY.CS.NET>

    (define foo
      (lambda () '(x y z)))

    (define baz
      (lambda () `(x y z)))

    (define grump
      (lambda (k) `(x y z ,k)))

    Are the following expressions true, false, or implementation-dependent?
     1:  (eq? (foo) (foo))
     2:  (eq? (baz) (baz))
     3:  (eq? (grump 'w) (grump 'w))

This is definitely an ommission from the report; I don't think the issue
ever got much discussion.  Personally I don't much care how backquote
works, although I think it would be nice if it did a minimum of consing.
Other people think differently.  My advice would be to assume it's
implementation-dependent until the question gets discussed on this
mailing list, and to see Steele's book Common Lisp: The Language for a
discussion of the range of possible implementations until something
better comes along.