From: Barry Shein
Subject: possibly a trivia question...
Date: 
Message-ID: <34825@bu-cs.BU.EDU>
In Common Lisp, given:

	(setf (get 'foo 'bar) 'goo)

what should:

	(prog (foo) (get 'foo 'bar))

return (prog could be (lambda (foo)..) or (let (foo)...), I assume the
answer should be basically the same)?

One implementation I tried returned 'goo and the other NIL.

I couldn't find any definition in CLTL but if I missed it and you know
the page number that would be the perfect answer.
-- 
	-Barry Shein

Software Tool & Die, Purveyors to the Trade
1330 Beacon Street, Brookline, MA 02146, (617) 739-0202
Internet: ···@skuld.std.com
UUCP:     encore!xylogics!skuld!bzs or uunet!skuld!bzs
From: Michael Travers
Subject: Re: possibly a trivia question...
Date: 
Message-ID: <162@mit-amt.MEDIA.MIT.EDU>
In article <·····@bu-cs.BU.EDU> ···@bu-cs.BU.EDU (Barry Shein) writes:
>
>In Common Lisp, given:
>
>	(setf (get 'foo 'bar) 'goo)
>
>what should:
>
>	(prog (foo) (get 'foo 'bar))
>
>return (prog could be (lambda (foo)..) or (let (foo)...), I assume the
>answer should be basically the same)?

I would have thought so too, but it turns out the prog is not like
progn in that it doesn't return the value of its last form.  Prog is
defined in terms of tagbody (see ClTL p. 133) and tagbody returns nil
by default (p. 130).

Binding a variable never affects its property list, so that's
irrelevant.

>One implementation I tried returned 'goo and the other NIL.

The first one is apparently in error.
-- 

Michael Travers / MIT Media Lab / ··@media-lab.media.mit.edu