🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.clos
Article #173

Re: Generic Macro Proposal (really interpreted/compiled semantics)

#173
From: Barry Margolin
Date: Tue, 25 Aug 1992 17:53
31 lines
1830 bytes
In article <10367.9208251621@subnode.aiai.ed.ac.uk> jeff@aiai.edinburgh.ac.uk (Jeff Dalton) writes:
>> Since the above program isn't conforming, anything is legal. 
>
>If this is what the dpANS says, I think it should change.  

Actually, I think I was overstating it.  Perhaps I should have said, "since
it isn't conforming, the standard doesn't specify which one it returns."

>							    Does anyone
>seriously think that the behavior of the following program is or
>should be completely undefined, ie that it might be anything at all?
>
>(defun g ()
>  (flet ((f (x) x))
>    (typep #'f 'compiled-function)))

Lisp's introspective facilities make it difficult to use general rules
about interpreter/compiler equivalence (we considered getting rid of the
COMPILED-FUNCTION type, though).  I agree that it's not totally undefined,
but it isn't well-defined whether it returns T or NIL.  Once it's been
compiled it's guaranteed to return T, but before then it could return
either.  On some systems it will return T all the time, even though these
systems use a traditional interpreter; to simplify FUNCALL and APPLY, they
implement interpreted functions as a closure of a compiled interpreter
function over the lambda expression.

-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
Technical Details
Message-ID: <17ds3nINNe7g@early-bird.think.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!caen!sdd.hp.com!think.com!barmar
References: <10367.9208251621@subnode.aiai.ed.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!caen!sdd.hp.com!think.com!barmar
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.lang.clos
Subject: Re: Generic Macro Proposal (really interpreted/compiled semantics)
Date: 25 Aug 1992 17:53:59 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
Lines: 31
Message-ID: <17ds3nINNe7g@early-bird.think.com>
References: <10367.9208251621@subnode.aiai.ed.ac.uk>
NNTP-Posting-Host: telecaster.think.com