Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news.harvard.edu!news2.near.net!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!swrinde!pipex!uknet!festival!edcogsci!jeff
From: jeff@aiai.ed.ac.uk (Jeff Dalton)
Subject: Re: Stopping fp functions consing in CMUCL
Message-ID: <Cvrn8s.J1M@cogsci.ed.ac.uk>
Sender: usenet@cogsci.ed.ac.uk (C News Software)
Nntp-Posting-Host: bute.aiai.ed.ac.uk
Organization: AIAI, University of Edinburgh, Scotland
References: <TFB.94Sep7120427@burns.cogsci.ed.ac.uk>
Date: Wed, 7 Sep 1994 15:34:04 GMT
Lines: 23

In article <TFB.94Sep7120427@burns.cogsci.ed.ac.uk> tfb@cogsci.ed.ac.uk (Tim Bradshaw) writes:

>A slightly deeper question: given the semantics of CL (note *not*
>Lisp-in-general) -- ie that you can redefine functions at least -- is
>it really possible to avoid this sort of consing at *all*?  I never
>really understand whether a declaration of a function's type (esp its
>return type) allows a caller to do some quick and cons-free thing to
>get the result back from it -- I suppose doing whatever block
>compiling does -- or do you have to play safe because it could be
>redefined with a different type later?

I believe that you can assume the dcl is true at least for functions
in the same file, because you can assume functions not declared
notinline won't be redefined -- you call call them directly rather
than via their symbol-function.  (At least KCL used to do this, and
I don't remember X3J13 doing anything that would rule it out.)

In any case, an implementation might adopt nonstandard semantics
or provide it as an extension.

-- jeff


